|
CeresEngine 0.2.0
A game development framework
|
A class that describes access to a CameraComponent.
More...
#include <CeresEngine/Scene/Camera.hpp>
Public Member Functions | |
| double | getFieldOfView () const noexcept |
| The camera field of view. | |
| void | setFieldOfView (double fieldOfView) noexcept |
| The camera field of view. | |
| double | getNearPlane () const noexcept |
| The distance where objects near from the camera start clipping. | |
| void | setNearPlane (double nearPlane) noexcept |
| The distance where objects near from the camera start clipping. | |
| double | getFarPlane () const noexcept |
| The distance where objects far from the camera start clipping. | |
| void | setFarPlane (double farPlane) noexcept |
| The distance where objects far from the camera start clipping. | |
| double | getAspectRatio () const noexcept |
| void | setAspectRatio (double aspectRatio) noexcept |
| const GPUImagePtr & | getRenderImage () const |
| The render target that the camera should render to. | |
| void | setRenderImage (GPUImagePtr renderImage) |
| The render target that the camera should render to. | |
| const RendererCameraSettings & | getRendererSettings () const |
| A set of settings that should be used by renderer when rendering this camera. | |
| void | setRendererSettings (const RendererCameraSettings &rendererSettings) |
| A set of settings that should be used by renderer when rendering this camera. | |
| template<CInvocable< RendererCameraSettings & > Func> | |
| decltype(auto) | updateRendererSettings (Func &&func) noexcept |
| A set of settings that should be used by renderer when rendering this camera. | |
| void | changeViewportAspectRatio (double width, double height) noexcept |
| Updates the viewport aspect ratio. | |
| Matrix4 | getProjection () const noexcept |
| Transform | getView () const noexcept |
| Vector3 | unproject (Vector3 screenSpaceVector) const noexcept |
Transforms a screen-space coordinates vector screenSpaceVector into world coordinates vector. | |
| Vector3 | project (Vector3 worldSpaceVector) const noexcept |
Transforms a world-space coordinates vector worldSpaceVector into screen-space coordinates vector. | |
| Ray | toRay (const Point2 &point) const noexcept |
| bool | visible (Vector3 worldSpaceVector) const noexcept |
| Checks a world-space coordinates vector is visible from the camera. | |
| bool | visible (const AABox &boundingBox) const noexcept |
| Checks if the bounding box is visible from the camera. | |
Public Member Functions inherited from CeresEngine::Component< T >::Accessor | |
| Accessor (const Entity &entity) | |
Static Public Member Functions | |
| template<typename Processor > | |
| static constexpr void | reflect (Processor &&RTTI) |
| Executes the given processor for every field of the struct. | |
Additional Inherited Members | |
Public Attributes inherited from CeresEngine::Component< T >::Accessor | |
| const Entity & | entity |
Protected Types inherited from CeresEngine::Component< T >::Accessor | |
| using | C = TC |
Protected Member Functions inherited from CeresEngine::Component< T >::Accessor | |
| template<typename T > | |
| auto | mutate (T C::*ptr) |
Accesses an element from an existing Component. | |
| template<typename MutatorFunc , typename T > requires (CInvocable<MutatorFunc, T&>) | |
| decltype(auto) | mutate (MutatorFunc &&func, T C::*ptr) |
Accesses an element from an existing Component. | |
| template<typename T1 , typename T2 , typename... Ts> | |
| Tuple< ComponentFieldMutator< T1, C >, ComponentFieldMutator< T2, C >, ComponentFieldMutator< Ts, C >... > | mutate (T1 C::*ptr1, T2 C::*ptr2, Ts C::*... ptrs) |
| TODO Write docs. | |
| template<typename MutatorFunc , typename T1 , typename T2 , typename... Ts> | |
| Tuple< ComponentFieldMutator< T1, C >, ComponentFieldMutator< T2, C >, ComponentFieldMutator< Ts, C >... > | mutate (MutatorFunc &&func, T1 C::*ptr1, T2 C::*ptr2, Ts C::*... ptr) |
| template<typename T > | |
| auto | get (T C::*ptr) |
Accesses an element from an existing Component. | |
| template<typename T1 , typename T2 , typename... Ts> | |
| Tuple< ComponentFieldMutator< T1, C >, ComponentFieldMutator< T2, C >, ComponentFieldMutator< Ts, C >... > | get (T1 C::*ptr1, T2 C::*ptr2, Ts C::*... ptrs) |
Accesses an element from an existing Component. | |
| template<typename T > | |
| const T & | read (const T C::*ptr) const |
Accesses an element from an existing Component. | |
| template<typename T1 , typename T2 , typename... Ts> | |
| Tuple< const T1 &, const T2 &, const Ts &... > | read (const T1 C::*ptr1, const T2 C::*ptr2, const Ts C::*... ptrs) const |
| TODO Write docs. | |
| template<typename T > | |
| const T & | get (const T C::*ptr) const |
Accesses an element from an existing Component. | |
| template<typename T1 , typename T2 , typename... Ts> | |
| Tuple< const T1 &, const T2 &, const Ts &... > | get (const T1 C::*ptr1, const T2 C::*ptr2, const Ts C::*... ptrs) const |
Accesses an element from an existing Component. | |
A class that describes access to a CameraComponent.
|
noexcept |
Updates the viewport aspect ratio.
| width | The viewport width |
| height | The viewport height |
|
noexcept |
|
noexcept |
The distance where objects far from the camera start clipping.
|
noexcept |
The camera field of view.
|
noexcept |
The distance where objects near from the camera start clipping.
|
noexcept |
| const RendererCameraSettings & CeresEngine::CameraComponent::Accessor::getRendererSettings | ( | ) | const |
A set of settings that should be used by renderer when rendering this camera.
| const GPUImagePtr & CeresEngine::CameraComponent::Accessor::getRenderImage | ( | ) | const |
The render target that the camera should render to.
|
noexcept |
Transforms a world-space coordinates vector worldSpaceVector into screen-space coordinates vector.
| worldSpaceVector | The world-space vector to be |
|
inlinestaticconstexpr |
Executes the given processor for every field of the struct.
| RTTI | The processor to be ran for every field. |
| aspectRatio | The screen aspect ration |
The distance where objects far from the camera start clipping.
| farPlane | The distance where objects far from the camera start clipping |
The camera field of view.
| fieldOfView | The camera's new field of view angle |
The distance where objects near from the camera start clipping.
| nearPlane | The distance where objects near the camera start clipping |
| void CeresEngine::CameraComponent::Accessor::setRendererSettings | ( | const RendererCameraSettings & | rendererSettings | ) |
A set of settings that should be used by renderer when rendering this camera.
| void CeresEngine::CameraComponent::Accessor::setRenderImage | ( | GPUImagePtr | renderImage | ) |
The render target that the camera should render to.
|
noexcept |
|
noexcept |
Transforms a screen-space coordinates vector screenSpaceVector into world coordinates vector.
| screenSpaceVector | The screen-space vector to be transformed |
|
inlinenoexcept |
A set of settings that should be used by renderer when rendering this camera.
Checks if the bounding box is visible from the camera.
| boundingBox |
Checks a world-space coordinates vector is visible from the camera.
| worldSpaceVector | The world-space vector to be checked for visibility |
true if the point is visible from the camera perspective, false otherwise.