Scene Lab
An open source project by FPL.
 All Classes Namespaces Files Functions Pages
scene_lab::BasicCamera Class Reference

Inherits CameraInterface.

Public Member Functions

virtual mathfu::mat4 GetTransformMatrix (int32_t index) const
 Returns the View/Projection matrix. index must be 0.
 
virtual mathfu::mat4 GetTransformMatrix () const
 Returns the View/Projection matrix.
 
virtual mathfu::mat4 GetViewMatrix (int32_t index) const
 Returns just View matrix. index must be 0.
 
virtual mathfu::mat4 GetViewMatrix () const
 Returns just the View matrix.
 
virtual void set_position (int32_t index, const mathfu::vec3 &position)
 Set the camera's world position. index must be 0.
 
virtual void set_position (const mathfu::vec3 &position)
 Set the camera's world position.
 
virtual mathfu::vec3 position (int32_t index) const
 Get the camera's world position. index must be 0.
 
virtual mathfu::vec3 position () const
 Get the camera's world position.
 
virtual void set_facing (const mathfu::vec3 &facing)
 Set the camera's forward direction.
 
virtual const mathfu::vec3 & facing () const
 Get the camera's forward direction.
 
virtual void set_up (const mathfu::vec3 &up)
 Set the camera's up direction.
 
virtual const mathfu::vec3 & up () const
 Get the camera's up direction.
 
mathfu::vec3 Right () const
 Get the camera's right direction, calculated via cross product of its forward and up directions. More...
 
void set_viewport_angle (float viewport_angle)
 Set the camera's viewport angle, in radians.
 
virtual float viewport_angle () const
 Get the camera's viewport angle, in radians.
 
virtual void set_viewport_resolution (mathfu::vec2 viewport_resolution)
 Set the camera's viewport resolution.
 
virtual mathfu::vec2 viewport_resolution () const
 Get the camera's viewport resolution.
 
virtual void set_viewport_near_plane (float viewport_near_plane)
 Set the distance to the near clipping plane.
 
virtual float viewport_near_plane () const
 Get the distance to the near clipping plane.
 
virtual void set_viewport_far_plane (float viewport_far_plane)
 Set the distance to the far clipping plane.
 
virtual float viewport_far_plane () const
 Get the distance to the far clipping plane.
 
virtual void set_viewport (const mathfu::vec4i &viewport)
 Set the camera's viewport.
 
virtual void set_viewport (int32_t index, const mathfu::vec4i &viewport)
 Set the camera's viewport. index must be 0.
 
virtual const mathfu::vec4i & viewport (int32_t index) const
 Get the camera's viewport. index must be 0.
 
virtual const mathfu::vec4i & viewport () const
 Get the camera's viewport settings.
 
virtual bool IsStereo () const
 Returns false, since this camera is not stereoscopic by design.
 
virtual void set_stereo (bool is_stereo)
 Fails if you try to set stereoscopic mode to anything but false.
 
void Initialize (float viewport_angle, mathfu::vec2 viewport_resolution, float viewport_near_plane, float viewport_far_plane)
 Initialize the camera's viewport settings.
 

Member Function Documentation

mathfu::vec3 scene_lab::BasicCamera::Right ( ) const
inline

Get the camera's right direction, calculated via cross product of its forward and up directions.


The documentation for this class was generated from the following file: