SpiecsEngine
 
Loading...
Searching...
No Matches

◆ SetPerspective() [2/2]

void Spices::Camera::SetPerspective ( float fov,
float nearPlane,
float aspectRatio = 1.777f )

Set ProjectionMatrix by using perspective type.

Parameters
[in]fovField of View, usually 45.0 degree.
[in]nearPlaneNearPlane, usually 0.01.
[in]aspectRatioAspectRatio, viewport width / viewport height.

Definition at line 15 of file Camera.cpp.

16 {
18
20
22 m_PerspectiveParam.nearPlane = nearPlane;
23 m_PerspectiveParam.aspectRatio = aspectRatio;
24 }
#define SPICES_PROFILE_ZONE
ProjectionType m_ProjectionType
Definition Camera.h:169
PerspectiveParam m_PerspectiveParam
Camera PerspectiveParam.
Definition Camera.h:179
@ Perspective
perspective
Definition Camera.h:22

References Spices::PerspectiveParam::aspectRatio, Spices::PerspectiveParam::fov, m_PerspectiveParam, m_ProjectionType, Spices::PerspectiveParam::nearPlane, and Spices::Perspective.

Referenced by SetPerspective().