PerspectiveCameraComponent Class Template
Component that stores perspective camera projection parameters. More...
Declaration
Public Member Functions Index
template <typename THandle> | |
| void | setPerspective (float fovY, float aspectRatio, float zNear, float zFar) noexcept |
|
Sets the perspective projection parameters. More... | |
template <typename THandle> | |
| void | setZNear (const float zNear) noexcept |
|
Sets the near clipping plane distance. More... | |
template <typename THandle> | |
| void | setZFar (const float zFar) noexcept |
|
Sets the far clipping plane distance. More... | |
template <typename THandle> | |
| void | setFovY (const float fovY) noexcept |
|
Sets the vertical field of view. More... | |
template <typename THandle> | |
| void | setAspectRatio (const float aspectRatio) noexcept |
|
Sets the aspect ratio used by the camera. More... | |
template <typename THandle> | |
| float | fovY () const noexcept |
|
Gets the current vertical field of view. More... | |
template <typename THandle> | |
| float | aspectRatio () const noexcept |
|
Gets the current aspect ratio. More... | |
template <typename THandle> | |
| float | zNear () const noexcept |
|
Gets the current near clipping plane distance. More... | |
template <typename THandle> | |
| float | zFar () const noexcept |
|
Gets the current far clipping plane distance. More... | |
template <typename THandle> | |
| bool | isDirty () const noexcept |
|
Returns whether the component requires projection recomputation. More... | |
template <typename THandle> | |
| void | clearDirty () noexcept |
|
Clears the dirty flag after dependent systems consumed updates. More... | |
Private Member Attributes Index
template <typename THandle> | |
| float | aspectRatio_ = 1.0f |
|
The aspect ratio of the camera (width/height). More... | |
template <typename THandle> | |
| float | zNear_ = 0.1f |
|
The near clipping plane distance. More... | |
template <typename THandle> | |
| float | zFar_ = 1000.0f |
|
The far clipping plane distance. More... | |
template <typename THandle> | |
| float | fovY_ = radians(90) |
|
The vertical field of view in radians. More... | |
template <typename THandle> | |
| bool | isDirty_ = true |
|
Dirty flag used to signal projection updates. More... | |
Description
Component that stores perspective camera projection parameters.
- Template Parameters
-
THandle Owning entity handle type.
Definition at line 23 of file PerspectiveCameraComponent.ixx.
Public Member Functions
aspectRatio()
| inline noexcept |
Gets the current aspect ratio.
- Returns
The aspect ratio (width/height).
Definition at line 135 of file PerspectiveCameraComponent.ixx.
Referenced by helios::engine::scene::components::PerspectiveCameraComponent< THandle >::setAspectRatio and helios::engine::scene::components::PerspectiveCameraComponent< THandle >::setPerspective.
clearDirty()
| inline noexcept |
Clears the dirty flag after dependent systems consumed updates.
Definition at line 169 of file PerspectiveCameraComponent.ixx.
fovY()
| inline noexcept |
Gets the current vertical field of view.
- Returns
The vertical field of view in radians.
Definition at line 126 of file PerspectiveCameraComponent.ixx.
Referenced by helios::engine::scene::components::PerspectiveCameraComponent< THandle >::setFovY and helios::engine::scene::components::PerspectiveCameraComponent< THandle >::setPerspective.
isDirty()
| inline noexcept |
setAspectRatio()
| inline noexcept |
Sets the aspect ratio used by the camera.
- Parameters
-
aspectRatio The new aspect ratio (width/height).
Definition at line 116 of file PerspectiveCameraComponent.ixx.
Reference helios::engine::scene::components::PerspectiveCameraComponent< THandle >::aspectRatio.
setFovY()
| inline noexcept |
Sets the vertical field of view.
- Parameters
-
fovY The new vertical field of view in radians.
Definition at line 106 of file PerspectiveCameraComponent.ixx.
Reference helios::engine::scene::components::PerspectiveCameraComponent< THandle >::fovY.
setPerspective()
| inline noexcept |
Sets the perspective projection parameters.
- Parameters
-
fovY The vertical field of view in radians.
aspectRatio The aspect ratio (width/height).
zNear The near clipping plane distance.
zFar The far clipping plane distance.
Definition at line 68 of file PerspectiveCameraComponent.ixx.
References helios::engine::scene::components::PerspectiveCameraComponent< THandle >::aspectRatio, helios::engine::scene::components::PerspectiveCameraComponent< THandle >::fovY, helios::engine::scene::registerComponents, helios::engine::scene::components::PerspectiveCameraComponent< THandle >::zFar and helios::engine::scene::components::PerspectiveCameraComponent< THandle >::zNear.
setZFar()
| inline noexcept |
Sets the far clipping plane distance.
- Parameters
-
zFar The new far clipping plane distance.
Definition at line 95 of file PerspectiveCameraComponent.ixx.
References helios::engine::scene::registerComponents and helios::engine::scene::components::PerspectiveCameraComponent< THandle >::zFar.
setZNear()
| inline noexcept |
Sets the near clipping plane distance.
- Parameters
-
zNear The new near clipping plane distance.
Definition at line 83 of file PerspectiveCameraComponent.ixx.
References helios::engine::scene::registerComponents and helios::engine::scene::components::PerspectiveCameraComponent< THandle >::zNear.
zFar()
| inline noexcept |
Gets the current far clipping plane distance.
- Returns
The far clipping plane distance.
Definition at line 153 of file PerspectiveCameraComponent.ixx.
Referenced by helios::engine::scene::components::PerspectiveCameraComponent< THandle >::setPerspective and helios::engine::scene::components::PerspectiveCameraComponent< THandle >::setZFar.
zNear()
| inline noexcept |
Gets the current near clipping plane distance.
- Returns
The near clipping plane distance.
Definition at line 144 of file PerspectiveCameraComponent.ixx.
Referenced by helios::engine::scene::components::PerspectiveCameraComponent< THandle >::setPerspective and helios::engine::scene::components::PerspectiveCameraComponent< THandle >::setZNear.
Private Member Attributes
aspectRatio_
|
The aspect ratio of the camera (width/height).
Defaults to 1.0.
Definition at line 30 of file PerspectiveCameraComponent.ixx.
fovY_
|
The vertical field of view in radians.
Defaults to 90 degrees (converted to radians).
Definition at line 51 of file PerspectiveCameraComponent.ixx.
isDirty_
|
Dirty flag used to signal projection updates.
Definition at line 56 of file PerspectiveCameraComponent.ixx.
zFar_
|
The far clipping plane distance.
Defaults to 1000.0.
Definition at line 44 of file PerspectiveCameraComponent.ixx.
zNear_
|
The near clipping plane distance.
Defaults to 0.1.
Definition at line 37 of file PerspectiveCameraComponent.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.