Component representing a camera, containing projection and view parameters.
More...
#include <camera.h>
|
| static glm::mat4 | computeProjection (const Camera &camera, float viewportAspect) |
| | Compute the projection matrix for this camera.
|
| static glm::mat4 | computeViewmodelProjection (const Camera &camera, float viewportAspect) |
| | The projection Viewmodel meshes draw through: viewmodelFovY, VIEWMODEL_Z_NEAR.
|
|
|
float | fovY = glm::radians(70.0f) |
| | Vertical, radians.
|
| float | orthoHeight = 10.0f |
|
float | aspect = 0.0f |
| | Width / height; <= 0 derives it from the viewport each frame.
|
|
float | focusDistance = 10.0f |
| | World distance held in sharp focus.
|
| float | dofAmount = 0.0f |
|
float | dofMaxBlur = 0.011f |
| | Widest blur radius, fraction of viewport height (0..0.05)
|
| float | viewmodelFovY = 0.0f |
| | Vertical field of view the eye draws Viewmodel meshes at, radians; 0 is fovY's.
|
|
|
static constexpr float | VIEWMODEL_Z_NEAR = 0.01f |
| | Near plane of the viewmodel's projection: a weapon held close is not cut by the world's.
|
Component representing a camera, containing projection and view parameters.
◆ computeProjection()
| glm::mat4 Vkm::Engine::Camera::computeProjection |
( |
const Camera & | camera, |
|
|
float | viewportAspect ) |
|
inlinestatic |
Compute the projection matrix for this camera.
- Parameters
-
| camera | The camera. |
| viewportAspect | Used while camera.aspect <= 0. |
- Returns
- The projection matrix.
◆ computeViewmodelProjection()
| glm::mat4 Vkm::Engine::Camera::computeViewmodelProjection |
( |
const Camera & | camera, |
|
|
float | viewportAspect ) |
|
inlinestatic |
The projection Viewmodel meshes draw through: viewmodelFovY, VIEWMODEL_Z_NEAR.
An orthographic camera's own: a field of view means nothing to it.
- Parameters
-
| camera | The camera. |
| viewportAspect | Used while camera.aspect <= 0. |
- Returns
- The projection matrix.
◆ orthoHeight
| float Vkm::Engine::Camera::orthoHeight = 10.0f |
◆ dofAmount
| float Vkm::Engine::Camera::dofAmount = 0.0f |
◆ viewmodelFovY
| float Vkm::Engine::Camera::viewmodelFovY = 0.0f |
Vertical field of view the eye draws Viewmodel meshes at, radians; 0 is fovY's.
Arms and a weapon keep their look whatever the world's field of view (Mesh::seenBy).
The documentation for this struct was generated from the following file: