CORGI
An open source project by
FPL.
|
An interface for 3D cameras, allowing them to have position, facing field of view, etc. Libraries can use this to pass around generic cameras that the game itself can implement the logic for. More...
#include <camera_interface.h>
An interface for 3D cameras, allowing them to have position, facing field of view, etc. Libraries can use this to pass around generic cameras that the game itself can implement the logic for.
Public Member Functions | |
virtual | ~CameraInterface () |
The destructor for the CameraInterface. | |
virtual mathfu::mat4 | GetTransformMatrix () const =0 |
Get the view/projection matrix. More... | |
virtual mathfu::mat4 | GetViewMatrix () const =0 |
Get the view matrix. More... | |
virtual mathfu::mat4 | GetTransformMatrix (int32_t index) const =0 |
Get the view/projection matrix at a given index. More... | |
virtual mathfu::mat4 | GetViewMatrix (int32_t index) const =0 |
Get the view matrix at a given index. More... | |
virtual mathfu::vec3 | position () const =0 |
Get the camera's world position,. More... | |
virtual mathfu::vec3 | position (int32_t index) const =0 |
Get the camera's world position at a given index. More... | |
virtual void | set_position (const mathfu::vec3 &position)=0 |
Set the camera's world position. More... | |
virtual void | set_position (int32_t index, const mathfu::vec3 &position)=0 |
Set the camera's world position. More... | |
virtual const mathfu::vec3 & | facing () const =0 |
Get the camera's forward direction. More... | |
virtual void | set_facing (const mathfu::vec3 &facing)=0 |
Set the camera's forward direction. More... | |
virtual const mathfu::vec3 & | up () const =0 |
Get the camera's up direction. More... | |
virtual void | set_up (const mathfu::vec3 &up)=0 |
Set the camera's up direction. More... | |
virtual void | set_viewport_angle (float viewport_angle)=0 |
Set the viewport angle. More... | |
virtual float | viewport_angle () const =0 |
Get the viewport angle. More... | |
virtual void | set_viewport_resolution (mathfu::vec2 viewport_resolution)=0 |
Set the camera's viewport resolution. More... | |
virtual mathfu::vec2 | viewport_resolution () const =0 |
Get the viewport resolution. More... | |
virtual void | set_viewport_near_plane (float viewport_near_plane)=0 |
Set the distance to the near clipping plane. More... | |
virtual float | viewport_near_plane () const =0 |
Get the distance to the near clipping plane. More... | |
virtual void | set_viewport_far_plane (float viewport_far_plane)=0 |
Set the distance to the far clipping plane. More... | |
virtual float | viewport_far_plane () const =0 |
Get the distance to the far clipping plane. More... | |
virtual void | set_viewport (const mathfu::vec4i &viewport)=0 |
Sets the camera's viewport. More... | |
virtual void | set_viewport (int32_t index, const mathfu::vec4i &viewport)=0 |
Sets the camera's viewport at a given index. More... | |
virtual const mathfu::vec4i & | viewport (int32_t index) const =0 |
Get the camera's viewport at a given index. More... | |
virtual bool | IsStereo () const =0 |
Check if the camera is stereoscopic. More... | |
virtual void | set_stereo (bool b)=0 |
Set a camera as stereoscopic. More... | |
|
pure virtual |
Get the camera's forward direction.
|
pure virtual |
Get the view/projection matrix.
|
pure virtual |
Get the view/projection matrix at a given index.
[in] | index | The index of the desired matrix. |
|
pure virtual |
Get the view matrix.
|
pure virtual |
Get the view matrix at a given index.
[in] | index | The index of the desired matrix. |
|
pure virtual |
Check if the camera is stereoscopic.
true
if this camera is stereoscopic. Otherwise it returns false
.
|
pure virtual |
Get the camera's world position,.
|
pure virtual |
Get the camera's world position at a given index.
[in] | index | The index of the camera whose position should be returned. |
|
pure virtual |
Set the camera's forward direction.
[in] | facing | A const mathfu::vec3 reference to the direction the camera should face. |
|
pure virtual |
Set the camera's world position.
[in] | position | A const mathfu::vec3 reference to the world position to set. |
|
pure virtual |
Set the camera's world position.
[in] | index | The index of the camera whose position should be set. |
[in] | position | A const mathfu::vec3 reference to the world position to set. |
|
pure virtual |
Set a camera as stereoscopic.
[in] | b | A bool determining if the camera is stereoscopic or not. |
|
pure virtual |
Set the camera's up direction.
[in] | up | A const mathfu::vec3 reference to the up direction to set for the camera. |
|
pure virtual |
Sets the camera's viewport.
[in] | viewport | A const mathfu::vec4i reference to the viewport that should be set. |
|
pure virtual |
Sets the camera's viewport at a given index.
[in] | index | The index of the viewport to set. |
[in] | viewport | A const mathfu::vec4i reference to the viewport that should be set. |
|
pure virtual |
Set the viewport angle.
[in] | viewport_angle | A float representing the viewport angle, in radians. |
|
pure virtual |
Set the distance to the far clipping plane.
[in] | viewport_far_plane | A float distance to the far clipping plane. |
|
pure virtual |
Set the distance to the near clipping plane.
[in] | viewport_near_plane | A float distance to the near clipping plane. |
|
pure virtual |
Set the camera's viewport resolution.
[in] | viewport_resolution | A mathfu::vec2 representing the viewport resolution. |
|
pure virtual |
Get the camera's up direction.
|
pure virtual |
Get the camera's viewport at a given index.
[in] | index | The index of the desired viewport. |
|
pure virtual |
Get the viewport angle.
|
pure virtual |
Get the distance to the far clipping plane.
|
pure virtual |
Get the distance to the near clipping plane.
|
pure virtual |
Get the viewport resolution.