Class CameraBase
Defined in File camera.h
Inheritance Relationships
Derived Types
public CE::Rendering::Camera2D(Class Camera2D)public CE::Rendering::Camera3D(Class Camera3D)
Class Documentation
-
class CameraBase
Tracks projection and view changes by revision.
The game or a render pass chooses when to use these matrices; the camera does not set render policy. Mutable state is unsynchronized: use one owner and copy matrices into frames. Matrix references borrow this camera and must not race with its setters.
Subclassed by CE::Rendering::Camera2D, CE::Rendering::Camera3D
Public Functions
-
virtual ~CameraBase() = default
-
void set_framebuffer_size(::CE::Platform::FramebufferSize size)
-
void set_view_matrix(const glm::mat4 &view)
-
inline ::CE::Platform::FramebufferSize framebuffer_size() const
Declaration:
[[nodiscard]]
-
inline const glm::mat4 &projection_matrix() const
Declaration:
[[nodiscard]]
-
inline const glm::mat4 &view_matrix() const
Declaration:
[[nodiscard]]
-
inline std::uint64_t revision() const
Declaration:
[[nodiscard]]
Protected Functions
-
virtual void recalculate_projection() = 0
-
virtual ~CameraBase() = default