Runtime camera attached to a scene entity via CameraComponent.
More...
#include <SceneCamera.h>
Inherits Raven::Camera.
Runtime camera attached to a scene entity via CameraComponent.
Extends the base Camera with scene-specific concerns: viewport management, projection recalculation, and a fixed isometric view mode.
The view matrix is rebuilt every frame from the owning entity's TransformComponent by Scene::OnUpdateRuntime.
◆ Mode
Projection mode for the camera.
| Enumerator |
|---|
| Perspective | Standard perspective projection driven by the entity's rotation.
|
| Isometric | Fixed 35.26°/45° pitch-yaw isometric view; entity rotation is ignored.
|
◆ SceneCamera()
| Raven::SceneCamera::SceneCamera |
( |
| ) |
|
Constructs a SceneCamera with default perspective settings and recalculates the projection.
◆ GetFarClip()
Returns the far clip plane distance.
- Returns
- Far clip (metres).
◆ GetMode()
Returns the active projection mode.
- Returns
- Current Mode.
◆ GetNearClip()
Returns the near clip plane distance.
- Returns
- Near clip (metres).
◆ GetPerspectiveFOV()
| FRAMEWORK_API f32 Raven::SceneCamera::GetPerspectiveFOV |
( |
| ) |
const |
|
inlinenoexcept |
Returns the vertical field of view in degrees.
- Returns
- Vertical FOV (degrees).
◆ SetMode()
| void Raven::SceneCamera::SetMode |
( |
Mode | mode | ) |
|
Switches between perspective and isometric projection modes.
- Parameters
-
◆ SetPerspective()
| void Raven::SceneCamera::SetPerspective |
( |
f32 | verticalFOV, |
|
|
f32 | nearClip, |
|
|
f32 | farClip ) |
Configures the perspective projection parameters and recalculates the projection matrix.
- Parameters
-
| verticalFOV | Vertical field of view in degrees. |
| nearClip | Near clip plane distance (metres). |
| farClip | Far clip plane distance (metres). |
◆ SetViewportSize()
| void Raven::SceneCamera::SetViewportSize |
( |
u32 | width, |
|
|
u32 | height ) |
Updates the projection matrix to match a new viewport resolution.
- Parameters
-
| width | Viewport width in pixels. |
| height | Viewport height in pixels. |
◆ Update()
Rebuilds the view matrix from the owning entity's world-space transform.
Called every frame by the scene update loop. In Mode::Isometric the rotation argument is ignored and the fixed isometric angles are applied.
- Parameters
-
| position | World-space position of the owning entity. |
| rotation | Euler angles in radians (XYZ). Ignored in isometric mode. |
The documentation for this class was generated from the following files: