15 #ifndef FPL_CAMERA_INTERFACE_H
16 #define FPL_CAMERA_INTERFACE_H
18 #include "mathfu/glsl_mappings.h"
63 virtual mathfu::vec3
position()
const = 0;
71 virtual mathfu::vec3
position(int32_t index)
const = 0;
90 virtual const mathfu::vec3&
facing()
const = 0;
102 virtual const mathfu::vec3&
up()
const = 0;
108 virtual void set_up(
const mathfu::vec3&
up) = 0;
172 virtual const mathfu::vec4i&
viewport(int32_t index)
const = 0;
189 #endif // FPL_CAMERA_INTERFACE_H
virtual void set_viewport_angle(float viewport_angle)=0
Set the viewport angle.
virtual ~CameraInterface()
The destructor for the CameraInterface.
Definition: camera_interface.h:34
virtual float viewport_far_plane() const =0
Get the distance to the far clipping plane.
virtual float viewport_angle() const =0
Get the viewport angle.
virtual void set_viewport_far_plane(float viewport_far_plane)=0
Set the distance to the far clipping plane.
virtual void set_facing(const mathfu::vec3 &facing)=0
Set the camera's forward direction.
virtual void set_viewport_resolution(mathfu::vec2 viewport_resolution)=0
Set the camera's viewport resolution.
virtual void set_viewport_near_plane(float viewport_near_plane)=0
Set the distance to the near clipping plane.
virtual const mathfu::vec4i & viewport(int32_t index) const =0
Get the camera's viewport at a given index.
virtual void set_viewport(const mathfu::vec4i &viewport)=0
Sets the camera's viewport.
virtual void set_up(const mathfu::vec3 &up)=0
Set the camera's up direction.
virtual mathfu::vec3 position() const =0
Get the camera's world position,.
virtual void set_stereo(bool b)=0
Set a camera as stereoscopic.
virtual mathfu::mat4 GetTransformMatrix() const =0
Get the view/projection matrix.
virtual const mathfu::vec3 & up() const =0
Get the camera's up direction.
virtual mathfu::mat4 GetViewMatrix() const =0
Get the view matrix.
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.
Definition: camera_interface.h:31
virtual void set_position(const mathfu::vec3 &position)=0
Set the camera's world position.
virtual bool IsStereo() const =0
Check if the camera is stereoscopic.
virtual mathfu::vec2 viewport_resolution() const =0
Get the viewport resolution.
virtual const mathfu::vec3 & facing() const =0
Get the camera's forward direction.
virtual float viewport_near_plane() const =0
Get the distance to the near clipping plane.