MayaFlux 0.3.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ look_at_perspective()

ViewTransform MayaFlux::Kinesis::look_at_perspective ( const glm::vec3 &  eye,
const glm::vec3 &  target,
float  fov_radians,
float  aspect,
float  near,
float  far,
const glm::vec3 &  up = glm::vec3(0.0F, 1.0F, 0.0F) 
)
inline

Construct complete ViewTransform from look-at and perspective parameters.

Parameters
eyeObserver position in source space
targetPoint the observer is looking at
fov_radiansVertical field of view in radians
aspectWidth / height aspect ratio
nearNear clip plane distance
farFar clip plane distance
upUp direction (default: positive Y)
Returns
ViewTransform with both view and projection matrices set

Definition at line 91 of file ViewTransform.hpp.

99{
100 return {
101 .view = glm::lookAt(eye, target, up),
102 .projection = glm::perspective(fov_radians, aspect, near, far)
103 };
104}

References MayaFlux::Kinesis::ViewTransform::view.