![]() |
Copperfield Engine 0.1
C++ Game Engine
|
Component used to render the scene. There must be one and only one of this component on the scene. More...
#include <default_components.hpp>
Public Member Functions | |
| CameraCmp (const CameraProjection projection, const coma::Vec3 &target, const float fov=60.0f, const float z_near=0.01f, const float z_far=1000.0f) | |
| Creates a CameraCmp with rotate_towards_target_ set to true. More... | |
| CameraCmp (const CameraProjection projection, const float fov=60.0f, const float z_near=0.01f, const float z_far=1000.0f) | |
| Creates a CameraCmp with rotate_towards_target_ set to false. More... | |
Public Attributes | |
| CameraProjection | projection_ = CameraProjection::kPerspective |
| Defines the CameraProjection to use. | |
| float | fov_ = 60.0f |
| Angular extent of the observable world that is seen at any given moment. | |
| float | z_near_ = 0.01f |
| Minimum distance to render. | |
| float | z_far_ = 1000.0f |
| Maximum distance to render. | |
| coma::Vec3 | target_ = coma::Vec3::zero |
| Defines the position the camera will look at if rotate_towards_target_ is set to true. | |
| bool | rotate_towards_target_ = false |
| Defines how the rotation of the camera should behave: More... | |
Component used to render the scene. There must be one and only one of this component on the scene.
|
inline |
Creates a CameraCmp with rotate_towards_target_ set to true.
| projection | projection_ |
| target | target_ |
| fov | fov_ |
| z_near | z_near_ |
| z_far | z_far_ |
|
inline |
Creates a CameraCmp with rotate_towards_target_ set to false.
| projection | projection_ |
| fov | fov_ |
| z_near | z_near_ |
| z_far | z_far_ |
| bool CameraCmp::rotate_towards_target_ = false |
Defines how the rotation of the camera should behave: