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
{
69
SPICES_PROFILE_ZONE
;
70
71
switch
(
m_ProjectionType
)
72
{
73
case
ProjectionType::Perspective
:
74
return
PerspectiveMatrix
(
75
m_PerspectiveParam
.
fov
,
76
m_PerspectiveParam
.
nearPlane
,
77
100000000.0f,
78
m_PerspectiveParam
.
aspectRatio
79
);
80
case
ProjectionType::Orthographic
:
81
return
OtrhographicMatrix
(
82
m_OrthographicParam
.
left
,
83
m_OrthographicParam
.
right
,
84
m_OrthographicParam
.
top
,
85
m_OrthographicParam
.
bottom
,
86
m_OrthographicParam
.
nearPlane
,
87
m_OrthographicParam
.
farPlane
88
);
89
}
90
91
return
glm::mat4(1.0f);
92
}
SPICES_PROFILE_ZONE
#define SPICES_PROFILE_ZONE
Definition
TracyProfilerWrapper.h:100
Spices::Camera::m_OrthographicParam
OrthographicParam m_OrthographicParam
Camera OrthographicParam.
Definition
Camera.h:184
Spices::Camera::m_ProjectionType
ProjectionType m_ProjectionType
Definition
Camera.h:169
Spices::Camera::m_PerspectiveParam
PerspectiveParam m_PerspectiveParam
Camera PerspectiveParam.
Definition
Camera.h:179
Spices::OtrhographicMatrix
glm::mat4 OtrhographicMatrix(float left, float right, float top, float bottom, float nearPlane, float farPlane)
Calculate Otrhographic Matrix.
Definition
Math.cpp:114
Spices::PerspectiveMatrix
glm::mat4 PerspectiveMatrix(float fov, float nearPlane, float farPlane, float aspectRatio)
Calculate Perspective Matrix.
Definition
Math.cpp:100
Spices::Orthographic
@ Orthographic
orthographic
Definition
Camera.h:27
Spices::Perspective
@ Perspective
perspective
Definition
Camera.h:22
Spices::OrthographicParam::nearPlane
float nearPlane
Definition
Camera.h:49
Spices::OrthographicParam::right
float right
Definition
Camera.h:46
Spices::OrthographicParam::bottom
float bottom
Definition
Camera.h:48
Spices::OrthographicParam::farPlane
float farPlane
Definition
Camera.h:50
Spices::OrthographicParam::top
float top
Definition
Camera.h:47
Spices::OrthographicParam::left
float left
Definition
Camera.h:45
Spices::PerspectiveParam::nearPlane
float nearPlane
Definition
Camera.h:36
Spices::PerspectiveParam::aspectRatio
float aspectRatio
Definition
Camera.h:37
Spices::PerspectiveParam::fov
float fov
Definition
Camera.h:35
References
m_ProjectionType
.
Spices
Camera
Generated on Sun Mar 8 2026 10:24:48 for SpiecsEngine by
1.10.0