SpiecsEngine
 
Loading...
Searching...
No Matches

◆ GetPMatrix()

const glm::mat4 Spices::Camera::GetPMatrix ( ) const

Get camera projection matrix.

Returns
Returns the camera projection matrix.
Note
only use in ImguiGizmos.

Definition at line 67 of file Camera.cpp.

68 {
70
71 switch (m_ProjectionType)
72 {
74 return PerspectiveMatrix(
77 100000000.0f,
79 );
81 return OtrhographicMatrix(
88 );
89 }
90
91 return glm::mat4(1.0f);
92 }
#define SPICES_PROFILE_ZONE
OrthographicParam m_OrthographicParam
Camera OrthographicParam.
Definition Camera.h:184
ProjectionType m_ProjectionType
Definition Camera.h:169
PerspectiveParam m_PerspectiveParam
Camera PerspectiveParam.
Definition Camera.h:179
glm::mat4 OtrhographicMatrix(float left, float right, float top, float bottom, float nearPlane, float farPlane)
Calculate Otrhographic Matrix.
Definition Math.cpp:114
glm::mat4 PerspectiveMatrix(float fov, float nearPlane, float farPlane, float aspectRatio)
Calculate Perspective Matrix.
Definition Math.cpp:100
@ Orthographic
orthographic
Definition Camera.h:27
@ Perspective
perspective
Definition Camera.h:22

References m_ProjectionType.