Raven Engine v0.1
Loading...
Searching...
No Matches
Raven::Camera Class Reference

Base class for camera implementations. More...

#include <Camera.h>

Inheritance diagram for Raven::Camera:
Raven::EditorCamera

Public Member Functions

 Camera ()=default
 Camera (const Crux::mat4 &projection)
 Constructs a Camera with a given projection matrix.
virtual ~Camera ()=default
const Crux::mat4GetProjection () const
const Crux::mat4GetViewProjection () const
const Crux::mat4GetView () const
const Crux::vec3GetPosition () const noexcept

Protected Attributes

Crux::mat4 m_Projection = Crux::mat4(1.0f)
 Projection matrix (e.g., perspective or orthographic).
Crux::mat4 m_View = Crux::mat4(1.0f)
 View matrix representing camera position/orientation.
Crux::mat4 m_ViewProjection = Crux::mat4(1.0f)
 Cached combined view-projection matrix.
Crux::vec3 m_Position = Crux::vec3(0.0f)
 World Space Position of the Camera.

Detailed Description

Base class for camera implementations.

Stores and provides access to projection, view, and view-projection matrices.

Typical usage involves subclassing to update view and view-projection matrices according to camera movement or other parameters.

Constructor & Destructor Documentation

◆ Camera() [1/2]

Raven::Camera::Camera ( )
default

◆ Camera() [2/2]

Raven::Camera::Camera ( const Crux::mat4 & projection)
inline

Constructs a Camera with a given projection matrix.

Parameters
projectionThe initial projection matrix.

◆ ~Camera()

virtual Raven::Camera::~Camera ( )
virtualdefault

Member Function Documentation

◆ GetPosition()

const Crux::vec3 & Raven::Camera::GetPosition ( ) const
inlinenoexcept
Returns
the world space position.

◆ GetProjection()

const Crux::mat4 & Raven::Camera::GetProjection ( ) const
inline
Returns
the projection matrix.

◆ GetView()

const Crux::mat4 & Raven::Camera::GetView ( ) const
inline
Returns
the view matrix.

◆ GetViewProjection()

const Crux::mat4 & Raven::Camera::GetViewProjection ( ) const
inline
Returns
the combined view-projection matrix.

Member Data Documentation

◆ m_Position

Crux::vec3 Raven::Camera::m_Position = Crux::vec3(0.0f)
protected

World Space Position of the Camera.

◆ m_Projection

Crux::mat4 Raven::Camera::m_Projection = Crux::mat4(1.0f)
protected

Projection matrix (e.g., perspective or orthographic).

◆ m_View

Crux::mat4 Raven::Camera::m_View = Crux::mat4(1.0f)
protected

View matrix representing camera position/orientation.

◆ m_ViewProjection

Crux::mat4 Raven::Camera::m_ViewProjection = Crux::mat4(1.0f)
protected

Cached combined view-projection matrix.


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