Class Camera

Inheritance Relationships

Derived Type

Class Documentation

class Camera

Base camera type.

Note

Abstract, so cannot be passed by value

Subclassed by Cacao::PerspectiveCamera

Public Functions

inline Camera()

Create a camera.

inline virtual ~Camera()

Destroy a camera.

virtual glm::vec3 GetPosition() const = 0

Get the position of the camera.

Returns:

The camera position in world space

virtual void SetPosition(glm::vec3 pos) = 0

Set the position of the camera.

Parameters:

pos – The new position

virtual glm::vec3 GetRotation() const = 0

Get the rotation of the camera.

Returns:

The camera rotation

virtual void SetRotation(glm::vec3 rot) = 0

Set the rotation of the camera.

Parameters:

rot – The new rotation

virtual glm::mat4 GetProjectionMatrix() const = 0

Get the projection matrix.

Returns:

The projection matrix

virtual glm::mat4 GetViewMatrix() const = 0

Get the view matrix.

Returns:

The view matrix

virtual void ResizeProjectionMatrix(Event &e) = 0

Event handler for resizing the projection matrix when the window size changes.

Note

For use by the engine only

Parameters:

e – The event object (which should be a DataEvent<glm::uvec2>)