Stores projection matrices and converts screen coordinates.
More...
#include <spk_camera.hpp>
Stores projection matrices and converts screen coordinates.
◆ convertScreenToCamera() [1/2]
Converts a screen position to camera space.
- Parameters
-
| p_screenPosition | Screen position. |
- Returns
- Camera-space position.
◆ convertScreenToCamera() [2/2]
Converts a screen position to camera space.
- Parameters
-
| p_screenPosition | Screen position with depth. |
- Returns
- Camera-space position.
◆ inverseProjectionMatrix()
Returns the inverse projection matrix.
- Returns
- Inverse projection matrix.
◆ projectionMatrix()
Returns the projection matrix.
- Returns
- Projection matrix.
◆ setOrthographic()
| void spk::Camera::setOrthographic |
( |
float | p_left, |
|
|
float | p_right, |
|
|
float | p_bottom, |
|
|
float | p_top, |
|
|
float | p_nearPlane = 0.1f, |
|
|
float | p_farPlane = 1000.0f ) |
Sets an orthographic projection.
- Parameters
-
| p_left | Left plane. |
| p_right | Right plane. |
| p_bottom | Bottom plane. |
| p_top | Top plane. |
| p_nearPlane | Near clipping plane. |
| p_farPlane | Far clipping plane. |
◆ setPerspective()
| void spk::Camera::setPerspective |
( |
float | p_fovDegrees, |
|
|
float | p_aspectRatio, |
|
|
float | p_nearPlane = 0.1f, |
|
|
float | p_farPlane = 1000.0f ) |
Sets a perspective projection.
- Parameters
-
| p_fovDegrees | Field of view in degrees. |
| p_aspectRatio | Aspect ratio. |
| p_nearPlane | Near clipping plane. |
| p_farPlane | Far clipping plane. |
◆ subscribeToProjectionEdition()
Subscribes to projection changes.
- Parameters
-
| p_job | Callback executed on projection updates. |
- Returns
- Contract for the subscription.
The documentation for this class was generated from the following files:
- includes/structure/engine/spk_camera.hpp
- srcs/structure/engine/spk_camera.cpp