vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::Camera Struct Reference

Component representing a camera, containing projection and view parameters. More...

#include <camera.h>

Static Public Member Functions

static glm::mat4 computeProjection (const Camera &camera, float viewportAspect)
 Compute the projection matrix for this camera.

Public Attributes

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)

Detailed Description

Component representing a camera, containing projection and view parameters.

Member Function Documentation

◆ computeProjection()

glm::mat4 Vkm::Engine::Camera::computeProjection ( const Camera & camera,
float viewportAspect )
inlinestatic

Compute the projection matrix for this camera.

Parameters
cameraThe camera.
viewportAspectUsed while camera.aspect <= 0.
Returns
The projection matrix.

Member Data Documentation

◆ orthoHeight

float Vkm::Engine::Camera::orthoHeight = 10.0f

Half-height, world units

◆ dofAmount

float Vkm::Engine::Camera::dofAmount = 0.0f

0 = off


The documentation for this struct was generated from the following file: