#include <camera.h>
Public Types | |
enum | projMode_e { PROJECT_ORTHO, PROJECT_FRUSTUM } |
Defines camera projection modes. More... | |
Public Member Functions | |
virtual | ~ICameraState (void) |
Destructor. | |
virtual void | resetCamera (void)=0 |
Reset camera to initial position and angles. | |
virtual void | setCameraRotation (const mat4_t &matrix)=0 |
Sets the camera rotation matrix. | |
virtual void | getCameraRotation (mat4_t &matrix)=0 |
Get the camera rotation matrix. | |
virtual void | setCameraTranslation (const vec3_t &t)=0 |
Sets the new camera translation vector. | |
virtual void | getCameraTranslation (vec3_t &t)=0 |
Get the current camera translation vector. | |
virtual void | setProjectionMode (projMode_e mode)=0 |
Set the projection mode. | |
virtual void | setFovY (float fovY)=0 |
Set the vertical field-of-view in degree. |
This interface is used to manipulate camera related parameters like projection mode and transformation.
Defines camera projection modes.
virtual ICameraState::~ICameraState | ( | void | ) | [inline, virtual] |
Destructor.
virtual void ICameraState::resetCamera | ( | void | ) | [pure virtual] |
Reset camera to initial position and angles.
Does not change the projection mode
Implemented in CCameraState.
virtual void ICameraState::setCameraRotation | ( | const mat4_t & | matrix | ) | [pure virtual] |
Sets the camera rotation matrix.
The matrix is 4x4 and all matrix elements are used. The matrix is strored in column major order.
matrix | The rotation matrix |
Implemented in CCameraState.
virtual void ICameraState::getCameraRotation | ( | mat4_t & | matrix | ) | [pure virtual] |
Get the camera rotation matrix.
The matrix is 4x4 and all elements are used.
matrix | The rotation maxtrix buffer. |
Implemented in CCameraState.
virtual void ICameraState::setCameraTranslation | ( | const vec3_t & | t | ) | [pure virtual] |
Sets the new camera translation vector.
This translation is applied after the camera was rotated.
t | Translation vector. |
Implemented in CCameraState.
virtual void ICameraState::getCameraTranslation | ( | vec3_t & | t | ) | [pure virtual] |
Get the current camera translation vector.
t | The translation vector will be stored there. |
Implemented in CCameraState.
virtual void ICameraState::setProjectionMode | ( | projMode_e | mode | ) | [pure virtual] |
Set the projection mode.
The default is PROJECT_FRUSTUM.
mode | Projection mode. |
Implemented in CCameraState.
virtual void ICameraState::setFovY | ( | float | fovY | ) | [pure virtual] |
Set the vertical field-of-view in degree.
The value can range from >0 degree up to < 180 degree. If the value is outside this range, it is set to 50. The horizontal fov depends on the width/height aspect of the viewport, where fovX = ( width / height ) * fovY. The default value is 50.
fovY | Vertical field-of-view in degree. |
Implemented in CCameraState.