Represents a camera component for rendering and viewing.
More...
#include <Camera.hpp>
|
| glm::mat4 | view (const Transform &transform) const |
| | Calculates the view matrix based on the given transform.
|
| glm::mat4 | projection () const |
| | Calculates the projection matrix.
|
| glm::mat4 | viewProjection (const Transform &transform) const |
| | Calculates the view-projection matrix.
|
|
| bool | isOrthographic = false |
| | True if camera projection mode is Orthographic, false if Perspective.
|
| float | orthoSize = 5.0f |
| | Vertical half-height size in world units when in Orthographic projection mode.
|
| float | fov = 45.f |
| | Vertical Field of View in degrees when in Perspective projection mode.
|
| float | aspect = 1.0f |
| | Viewport aspect ratio (width / height).
|
| float | nearPlane = 0.1f |
| | Distance to near clipping plane.
|
| float | farPlane = 100.f |
| | Distance to far clipping plane.
|
| float | moveSpeed = 5.f |
| | Movement speed multiplier (units/sec) for camera fly controls.
|
| float | mouseSensitivity = 0.1f |
| | Mouse look sensitivity multiplier.
|
Represents a camera component for rendering and viewing.
◆ projection()
| glm::mat4 Camera::projection |
( |
| ) |
const |
|
inline |
Calculates the projection matrix.
- Returns
- The 4x4 projection matrix.
◆ view()
| glm::mat4 Camera::view |
( |
const Transform & | transform | ) |
const |
|
inline |
Calculates the view matrix based on the given transform.
- Parameters
-
| transform | The transform of the camera entity. |
- Returns
- The 4x4 view matrix.
◆ viewProjection()
| glm::mat4 Camera::viewProjection |
( |
const Transform & | transform | ) |
const |
|
inline |
Calculates the view-projection matrix.
- Parameters
-
| transform | The transform of the camera entity. |
- Returns
- The 4x4 view-projection matrix.
◆ aspect
| float Camera::aspect = 1.0f |
Viewport aspect ratio (width / height).
◆ farPlane
| float Camera::farPlane = 100.f |
Distance to far clipping plane.
◆ fov
Vertical Field of View in degrees when in Perspective projection mode.
◆ isOrthographic
| bool Camera::isOrthographic = false |
True if camera projection mode is Orthographic, false if Perspective.
◆ mouseSensitivity
| float Camera::mouseSensitivity = 0.1f |
Mouse look sensitivity multiplier.
◆ moveSpeed
| float Camera::moveSpeed = 5.f |
Movement speed multiplier (units/sec) for camera fly controls.
◆ nearPlane
| float Camera::nearPlane = 0.1f |
Distance to near clipping plane.
◆ orthoSize
| float Camera::orthoSize = 5.0f |
Vertical half-height size in world units when in Orthographic projection mode.
The documentation for this struct was generated from the following file: