Inheritance diagram for Producer::Camera::Lens:
Public Types | |
enum | Projection { Perspective, Orthographic } |
Public Methods | |
Lens () | |
void | setPerspective (double hfov, double vfov, double nearClip, double farClip) |
void | setFrustum (double left, double right, double bottom, double top, double nearClip, double farClip) |
void | setOrtho (double left, double right, double bottom, double top, double nearClip, double farClip) |
bool | convertToOrtho (float d) |
bool | convertToPerspective (float d) |
void | apply (float xshear=0.0f, float yshear=0.0) |
void | generateMatrix (float xshear, float yshear, Matrix::value_type matrix[16]) |
Projection | getProjectionType () const |
void | getParams (double &left, double &right, double &bottom, double &top, double &nearClip, double &farClip) |
float | getHorizontalFov () const |
float | getVerticalFov () const |
void | setAutoAspect (bool ar) |
bool | getAutoAspect () const |
void | setAspectRatio (double aspectRatio) |
double | getAspectRatio () |
Protected Methods | |
~Lens () |
It is entirely contained within the Camera class. A Lens may be of type Perspective or Orthographic and set with one of the setFrustum, setProjection() or setOrtho(). The Lens type is implied by the method used to set it
|
Projection types |
|
apply the lens. This generates a projection matrix for OpenGL |
|
convertToOrtho() converts the current perspective view to an orthographic view with dimensions that conserve the scale of the objects at distance d. convertToPerspective() converts the current orthographic view to a perspective view with parameters that conserve the scale of objects at distance d. |
|
Set the Projection type to be of Perspective and provide the dimensions of the left, right, bottom, top, nearClip and farClip extents of the viewing frustum as indicated. xshear- Assymetrical shear in viewing frustum in the horizontal direction. Value given in normalized device coordinates (see setShear() below). yshear- Assymetrical shear in viewing frustum in the vertical direction. Value given in normalized device coordinates (see setShear() below). |
|
Set the Projection type to be of Orthographic and provide the left, right, bottom dimensions of the 2D rectangle |
|
Set the Projection type to be of Perspective and provide the following parameters to set the Projection matrix. hfov - Horizontal Field of View in degrees vfov - Vertical Field of View in degrees nearClip - Distance from the viewer to the near plane of the viewing frustum. farClip - Distance from the viewer to the far plane of the viewing frustum. xshear- Assymetrical shear in viewing frustum in the horizontal direction. Value given in normalized device coordinates (see setShear() below). yshear- Assymetrical shear in viewing frustum in the vertical direction. Value given in normalized device coordinates (see setShear() below). |