CGPdocs

camera_projection_orthographic

Orthographic projection parameters (box seen by the camera, no perspective).

module 10_camera_modelsource: camera_projection.hpp

Fields and methods

Members of the struct camera_projection_orthographic. Most of what you do with a CGP type goes through the free functions listed below.

Fields

float left = -1.0fLeft bound of the view volume before scaling by aspect_ratio, -1 by default.
float right = 1.0fRight bound of the view volume before scaling by aspect_ratio, 1 by default.
float bottom = -1.0fBottom bound of the view volume, -1 by default.
float top = 1.0fTop bound of the view volume, 1 by default.
float z_min = -10.0fNear bound of the view volume along the viewing direction, -10 by default.
float z_max = 10.0fFar bound of the view volume along the viewing direction, 10 by default.
float aspect_ratio = 1.0fWidth/height ratio of the viewport, 1 by default, that multiplies left and right (bottom and top are not scaled).

Methods

Returns the 4x4 OpenGL orthographic projection matrix of the box [left*aspect_ratio, right*aspect_ratio] x [bottom, top] x [z_min, z_max]. src
Returns the inverse of the orthographic projection matrix (normalized device coordinates to camera space). src

Functions taking a camera_projection_orthographic

None.

Functions returning a camera_projection_orthographic

None.

Operators

None.

CGP - Computer Graphics Programming.