Camera¶
High-level camera utilities.
Overview¶
Typical use cases:
Handling 2D camera view and projection matrices
Header¶
<RaeptorCogs/Camera.hpp>
Metadata¶
- Author
Estorc
- Version
v1.0
- Copyright
Copyright (c) 2025 Estorc MIT License.
Enums¶
Enum |
Description |
|---|---|
|
Camera flags enumeration. |
-
enum class RaeptorCogs::CameraFlags : uint32_t¶
Camera flags enumeration.
Defines flags for camera state management.
Values:
-
enumerator NONE¶
No flags set.
-
enumerator NEEDS_REBUILD_VIEW_MATRIX¶
Indicates the view matrix needs to be rebuilt.
-
enumerator NEEDS_REBUILD_PROJECTION_MATRIX¶
Indicates the projection matrix needs to be rebuilt.
-
enumerator NONE¶
Classes¶
Class |
Description |
|---|---|
|
Base Camera class. |
|
2D Camera class. |
-
class Camera¶
Base Camera class.
Provides an interface for 2D and 3D camera implementations.
Subclassed by RaeptorCogs::Camera2D
Public Functions
Protected Attributes
-
CameraFlags flags = CameraFlags::NEEDS_REBUILD_VIEW_MATRIX | CameraFlags::NEEDS_REBUILD_PROJECTION_MATRIX¶
Flags indicating the state of the camera.
-
CameraFlags flags = CameraFlags::NEEDS_REBUILD_VIEW_MATRIX | CameraFlags::NEEDS_REBUILD_PROJECTION_MATRIX¶
-
class Camera2D : public RaeptorCogs::Camera, public RaeptorCogs::Component2D¶
2D Camera class.
Implements a simple 2D camera with position and zoom.
Public Functions
-
void setZoom(float z)¶
Set the zoom level of the camera.
-
float getPositionX() const¶
Get the X position of the camera.
-
float getPositionY() const¶
Get the Y position of the camera.
-
float getZoom() const¶
Get the zoom level of the camera.
-
virtual void update(GAPI::Common::RenderPipeline &pipeline) override¶
Update the camera component.
-
void setZoom(float z)¶