Camera component for view and projection control.
More...
#include <visuals/Camera.hpp>
|
|
bool | isOrthographic |
| | Whether using orthographic projection.
|
| |
|
float | zoom |
| | Current zoom level.
|
| |
|
float | fov |
| | Field of view in degrees.
|
| |
|
float | nearClip |
| | Near clip plane distance.
|
| |
|
float | farClip |
| | Far clip plane distance.
|
| |
|
|
static const bool | unique = true |
| | Only one camera per GameObject.
|
| |
|
|
std::vector< std::pair< Utilities::ID, std::string > > | handlers |
| | Event handler registrations.
|
| |
Camera component for view and projection control.
Handles camera view matrix and projection settings. Supports both perspective and orthographic projections.
◆ Camera() [1/2]
| StevEngine::Visuals::Camera::Camera |
( |
bool | orthographic = false, |
|
|
float | fov = 70, |
|
|
float | zoomValue = 1, |
|
|
float | nearClip = 0.01, |
|
|
float | farClip = 1000 ) |
Create new camera.
- Parameters
-
| orthographic | Whether to use orthographic projection |
| fov | Field of view in degrees (for perspective) |
| zoomValue | Zoom level |
| nearClip | Near clip plane distance |
| farClip | Far clip plane distance |
◆ Camera() [2/2]
Create camera from text serialized data.
- Parameters
-
| stream | Stream containing serialized component data |
◆ Export()
| Utilities::Stream StevEngine::Visuals::Camera::Export |
( |
Utilities::StreamType | type | ) |
const |
|
virtual |
Serialize component to a stream.
- Parameters
-
| type | Type of stream to export to |
- Returns
- Serialized stream
Reimplemented from StevEngine::Component.
◆ GetProjection()
| Matrix4 StevEngine::Visuals::Camera::GetProjection |
( |
| ) |
const |
Get projection matrix for camera.
- Returns
- Projection matrix based on current settings
◆ GetType()
| std::string StevEngine::Visuals::Camera::GetType |
( |
| ) |
const |
|
inlinevirtual |
◆ GetView()
| Matrix4 StevEngine::Visuals::Camera::GetView |
( |
| ) |
const |
Get view matrix for camera.
- Returns
- View transformation matrix
The documentation for this class was generated from the following files: