|
| Camera (void) |
| Inits with default values but does not calculate the matrices.
|
|
float | get_aspect (void) const |
| Sets the viewing parameters and calcualtes view matrices.
|
|
float | get_vertical_fov (void) const |
| Returns the vertical FOV of the projection in RAD.
|
|
void | update_inv_proj_mat (void) |
| Updates inverse projection matrix from znear, zfar and aspect.
|
|
void | update_inv_view_mat (void) |
| Updates the inverse view matrix from pos, viewdir and upvec.
|
|
void | update_matrices (void) |
| Updates view, projection and inverse matrices.
|
|
void | update_proj_mat (void) |
| Updates the projection matrix from znear, zfar and aspect.
|
|
void | update_view_mat (void) |
| Updates the view matrix from pos, viewdir and upvec.
|
|
A camera class that manages viewing and projection matrices.
The camera is specified by a viewing matrix that transforms from world to camera coordinates, and a projection matrix that transforms from camera to unit cube coordinates as defined by OpenGL.
Viewing parameters are given by camera position, viewing direction and up-vector. Projection parameters are z-near and far plane scalars as well as top (also -bottom) and right (also -left) scalars, that define the projection into the OpenGL unit cube.
Definition at line 32 of file camera.h.
float ogl::Camera::get_aspect |
( |
void |
| ) |
const |
|
inline |
Sets the viewing parameters and calcualtes view matrices.
Sets the projection parameters and calcualtes the proj matrices. Returns the aspect ratio, right / top, or, width / height.
Definition at line 122 of file camera.h.