Class OrthographicCamera#

Class Documentation#

class OrthographicCamera#

Public Functions

constexpr OrthographicCamera(f32 left, f32 right, f32 bottom, f32 top, f32 near, f32 far)#

Constructor. Initializes the Orthographic/2D camera.

Parameters:
  • left – Left screen coordinate.

  • right – Right screen coordinate.

  • bottom – Bottom screen coordinate.

  • top – Top screen coordinate.

  • near – Near distance.

  • far – Far distance.

constexpr OrthographicCamera(const OrthographicCamera&) = default#

Copy constructor.

constexpr OrthographicCamera &operator=(const OrthographicCamera&) = default#

Copy assignment operator.

constexpr OrthographicCamera(OrthographicCamera&&) noexcept = default#

Move constructor.

constexpr OrthographicCamera &operator=(OrthographicCamera&&) noexcept = default#

Move assignment operator.

constexpr ~OrthographicCamera() = default#

Destructor.

constexpr void SetProjection(f32 left, f32 right, f32 bottom, f32 top, f32 near, f32 far)#

Set the projection matrix via screen coordinates.

Parameters:
  • left – Left screen coordinate.

  • right – Right screen coordinate.

  • bottom – Bottom screen coordinate.

  • top – Top screen coordinate.

  • near – Near distance.

  • far – Far distance.

constexpr const Math::Vec3 &GetPosition() const noexcept#

Retrieve the current camera position.

Returns:

Current camera position.

constexpr void SetPosition(const Math::Vec3 &position)#

Set the camera position.

Parameters:

position – New camera position.

constexpr const Math::Vec3 &GetRotation() const noexcept#

Retrieve the current camera rotation.

Returns:

Current camera rotation.

constexpr void SetRotation(const Math::Vec3 &rotation)#

Set the camera rotation.

Parameters:

rotation – New camera rotation.

constexpr const Math::Mat4 &GetProjectionMatrix() const noexcept#

Retrieve the projection matrix.

Returns:

Projection matrix.

constexpr const Math::Mat4 &GetViewMatrix() const noexcept#

Retrieve the view matrix.

Returns:

View matrix.