SpiecsEngine
 
Loading...
Searching...
No Matches
Spices::Camera Class Reference

Camera Class. This class just encapsulate Projection Matrix. More...

#include <Camera.h>

Public Member Functions

 Camera ()=default
 Constructor Function.
 
virtual ~Camera ()=default
 Destructor Function.
 
void SetPerspective (float fov, float nearPlane, float aspectRatio=1.777f)
 Set ProjectionMatrix by using perspective type.
 
void SetPerspective (float aspectRatio)
 Set ProjectionMatrix by using perspective type with one param.
 
void SetOrthographic (float left, float right, float top, float bottom, float nearPlane, float farPlane)
 Set ProjectionMatrix by using orthographic type.
 
void ResetStableFrames ()
 Reset m_StableFrames to 0.
 
void IncreaseStableFrames ()
 InCreate 1 to m_StableFrames per frame.
 
const glm::mat4 & GetPMatrixReverseZ ()
 Get camera reverse z projection matrix.
 
const glm::mat4 GetPMatrix () const
 Get camera projection matrix.
 
const ProjectionTypeGetProjectionType () const
 Get camera projection type.
 
float GetAspectRatio () const
 Get camera AspectRatio.
 
unsigned int GetStableFrames () const
 Get camera StableFrames.
 
PerspectiveParamGetPerspectiveParam ()
 Get PerspectiveParam.
 
OrthographicParamGetOrthographicParam ()
 Get OrthographicParam.
 

Private Member Functions

void CalculatePMatrixReverseZ ()
 Calculate Projection Matrix by parameter.
 

Private Attributes

glm::mat4 m_ProjectionMatrix = glm::mat4(1.0f)
 ProjectionMatrix. Init with identity Matrix.
 
ProjectionType m_ProjectionType = Perspective
 
unsigned int m_StableFrames = 0
 Camera Stable Frames Number.
 
PerspectiveParam m_PerspectiveParam
 Camera PerspectiveParam.
 
OrthographicParam m_OrthographicParam
 Camera OrthographicParam.
 

Detailed Description

Camera Class. This class just encapsulate Projection Matrix.

Todo
Implemented projection type switch.

Definition at line 58 of file Camera.h.


The documentation for this class was generated from the following files: