PerspectiveCameraComponent Class Template
Component that stores perspective camera projection parameters. More...
Declaration
Public Member Typedefs Index
template <typename THandle> | |
| using | Value_type = helios::math::vec4f |
template <typename THandle> | |
| using | Handle_type = THandle |
Public Constructors Index
template <typename THandle> | |
| PerspectiveCameraComponent (const float fovY, const float aspectRatio, const float zNear=0.1f, const float zFar=1000.0f) | |
Public Member Functions Index
template <typename THandle> | |
| void | setPerspective (const float fovY, const float aspectRatio, const float zNear, const float zFar) noexcept |
|
Sets the perspective projection parameters. More... | |
template <typename THandle> | |
| void | setValue (const Value_type &value) noexcept |
|
Sets the value of the perspective camera component as a vec4f. 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... | |
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... | |
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 Typedefs
Handle_type
|
Definition at line 57 of file PerspectiveCameraComponent.ixx.
Value_type
|
Definition at line 55 of file PerspectiveCameraComponent.ixx.
Public Constructors
PerspectiveCameraComponent()
| inline explicit |
Definition at line 59 of file PerspectiveCameraComponent.ixx.
References helios::engine::scene::components::PerspectiveCameraComponent< THandle >::aspectRatio, helios::engine::scene::components::PerspectiveCameraComponent< THandle >::fovY, helios::engine::scene::components::PerspectiveCameraComponent< THandle >::setPerspective, helios::engine::scene::components::PerspectiveCameraComponent< THandle >::zFar and helios::engine::scene::components::PerspectiveCameraComponent< THandle >::zNear.
Public Member Functions
aspectRatio()
| inline noexcept |
Gets the current aspect ratio.
- Returns
The aspect ratio (width/height).
Definition at line 144 of file PerspectiveCameraComponent.ixx.
Referenced by helios::engine::scene::components::PerspectiveCameraComponent< THandle >::PerspectiveCameraComponent, helios::engine::scene::components::PerspectiveCameraComponent< THandle >::setAspectRatio and helios::engine::scene::components::PerspectiveCameraComponent< THandle >::setPerspective.
fovY()
| inline noexcept |
Gets the current vertical field of view.
- Returns
The vertical field of view in radians.
Definition at line 135 of file PerspectiveCameraComponent.ixx.
Referenced by helios::engine::scene::components::PerspectiveCameraComponent< THandle >::PerspectiveCameraComponent, helios::engine::scene::components::PerspectiveCameraComponent< THandle >::setFovY and helios::engine::scene::components::PerspectiveCameraComponent< THandle >::setPerspective.
setAspectRatio()
| inline noexcept |
Sets the aspect ratio used by the camera.
- Parameters
-
aspectRatio The new aspect ratio (width/height).
Definition at line 125 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 116 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 71 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.
Referenced by helios::engine::scene::components::PerspectiveCameraComponent< THandle >::PerspectiveCameraComponent and helios::engine::scene::components::PerspectiveCameraComponent< THandle >::setValue.
setValue()
| inline noexcept |
Sets the value of the perspective camera component as a vec4f.
- Parameters
-
value
- See Also
Definition at line 87 of file PerspectiveCameraComponent.ixx.
Reference helios::engine::scene::components::PerspectiveCameraComponent< THandle >::setPerspective.
setZFar()
| inline noexcept |
Sets the far clipping plane distance.
- Parameters
-
zFar The new far clipping plane distance.
Definition at line 106 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 96 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 162 of file PerspectiveCameraComponent.ixx.
Referenced by helios::engine::scene::components::PerspectiveCameraComponent< THandle >::PerspectiveCameraComponent, 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 153 of file PerspectiveCameraComponent.ixx.
Referenced by helios::engine::scene::components::PerspectiveCameraComponent< THandle >::PerspectiveCameraComponent, 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.
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.