Class Camera
Defined in File Camera.hpp
Inheritance Relationships
Derived Types
public Cacao::OrthographicCamera(Class OrthographicCamera)public Cacao::PerspectiveCamera(Class PerspectiveCamera)
Class Documentation
-
class Camera
Base camera type.
Note
Abstract, so cannot be passed by value
Subclassed by Cacao::OrthographicCamera, Cacao::PerspectiveCamera
Public Functions
-
inline glm::vec3 GetPosition() const
Get the position of the camera.
- Returns:
The camera position in world space
-
inline void SetPosition(glm::vec3 pos)
Set the position of the camera.
- Parameters:
pos – The new position
-
inline glm::vec3 GetRotationEuler() const
Get the rotation of the camera as Euler angles in degrees.
- Returns:
The rotation as Euler angles
-
inline void SetRotation(glm::quat rot)
Set the rotation of the camera.
- Parameters:
rot – The new rotation
-
inline void SetRotationEuler(glm::vec3 rot)
Set the rotation of the camera using Euler angles in degrees.
- Parameters:
rot – The new rotation in Euler angles
-
inline glm::mat4 GetProjectionMatrix() const
Get the projection matrix.
- Returns:
The projection matrix
-
inline glm::vec3 GetFrontVector() const
Get the camera’s front vector.
- Returns:
The unit vector pointing out at the camera’s rotation
-
inline glm::vec3 GetRightVector() const
Get the camera’s up vector.
- Returns:
The unit vector perpendicular to both the front and world up vectors
-
inline glm::vec3 GetUpVector() const
Get the camera’s up vector.
- Returns:
The unit vector perpendicular to both the front and right vectors
-
inline glm::vec3 GetLookTarget() const
Get the point in world space where the camera is looking.
- Returns:
The look target (which is the position + the front vector)
-
inline glm::u8vec3 GetClearColor() const
Get the clear color used by the camera.
- Returns:
The camera clear color (in hexadecimal 00 to FF per component)
Protected Functions
Protected Attributes
-
EventConsumer resizeConsumer
-
inline glm::vec3 GetPosition() const