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

Flattened camera for the frame. More...

#include <camera_data.h>

Static Public Member Functions

static CameraData from (const glm::mat4 &view, const glm::mat4 &projection, const glm::vec3 &position)
 A camera with every derived field filled from its two matrices.

Public Attributes

float zNear = 0.1f
 Extracted from the projection.
float zFar = 1000.0f
 Extracted from the projection.

Detailed Description

Flattened camera for the frame.

Member Function Documentation

◆ from()

CameraData Vkm::Engine::CameraData::from ( const glm::mat4 & view,
const glm::mat4 & projection,
const glm::vec3 & position )
inlinestatic

A camera with every derived field filled from its two matrices.

Build a camera here, not field by field, so no derivative is stale.

Parameters
viewWorld to view.
projectionView to clip, perspective or orthographic.
positionThe eye in world space.
Returns
The camera, with no depth of field.

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