PanoramaViewer
|
#include <Camera.h>
Public Member Functions | |
Camera () | |
Camera (GLfloat near, GLfloat far) | |
virtual | ~Camera () |
void | buildPerspective (GLuint width, GLuint height, GLfloat angleOfView) |
GLfloat * | getModelMatrix () |
GLfloat * | getViewMatrix () |
GLfloat * | getProjectionMatrix () |
GLfloat * | getModelViewMatrix () |
void | setModelMatrix (GLfloat *matrix) |
void | setViewMatrix (GLfloat *matrix) |
void | setProjectionMatrix (GLfloat *matrix) |
GLuint | getWidth () |
GLuint | getHeight () |
GLfloat | getAngleOfView () |
GLfloat | getAspectRatio () |
GLfloat | getNearDistance () |
GLfloat | getFarDistance () |
Vector3 | getLookDirection () |
Vector3 | getUpDirection () |
Vector3 | getPosition () |
Static Public Member Functions | |
static GLfloat | toRadian (GLfloat angle) |
Private Attributes | |
Matrix4 | modelMatrix |
Matrix4 | viewMatrix |
Matrix4 | projectionMatrix |
GLfloat | near |
GLfloat | far |
GLfloat | angleOfView |
GLuint | width |
GLuint | height |
Vector3 | position |
Camera class: Responsible for encapsulate all matrix operations for visualization
LayerSceneGraph::Camera::Camera | ( | ) |
Default constructor. Initialize camera parameters with default values. Default values: near = 0.001; far = 50.0; width = 360; height = 480; angleOfView = 45;
LayerSceneGraph::Camera::Camera | ( | GLfloat | near, |
GLfloat | far | ||
) |
|
virtual |
Destructor. There isn't any dynamic allocated memory for any object.
void LayerSceneGraph::Camera::buildPerspective | ( | GLuint | width, |
GLuint | height, | ||
GLfloat | angleOfView | ||
) |
Computes and build a new perspective matrix based on the width, height and angleOfView parameters
GLfloat LayerSceneGraph::Camera::getAngleOfView | ( | ) |
Returns the value specified for the angle of view
GLfloat LayerSceneGraph::Camera::getAspectRatio | ( | ) |
Returns the aspect ratio value of the screen (device coordinates)
GLfloat LayerSceneGraph::Camera::getFarDistance | ( | ) |
Returns the distance to the far plane. All objects localized after the far plane are not visible.
GLuint LayerSceneGraph::Camera::getHeight | ( | ) |
Returns the height of the screen (device coordinates)
Vector3 LayerSceneGraph::Camera::getLookDirection | ( | ) |
Returns a vector which represents the direction to where camera is pointing
GLfloat * LayerSceneGraph::Camera::getModelMatrix | ( | ) |
Returns the model matrix (a pointer with 16 float values).
GLfloat * LayerSceneGraph::Camera::getModelViewMatrix | ( | ) |
Pre-multiplies the view and model matrix and then returns the result
GLfloat LayerSceneGraph::Camera::getNearDistance | ( | ) |
Returns the distance to the near plane. All objects localized before the near plane are not visible.
Vector3 LayerSceneGraph::Camera::getPosition | ( | ) |
Returns a vector which represents camera's position inside the scene
GLfloat * LayerSceneGraph::Camera::getProjectionMatrix | ( | ) |
Returns the projection matrix (a pointer with 16 float values).
Vector3 LayerSceneGraph::Camera::getUpDirection | ( | ) |
Returns a vector which represents the upper direction.
GLfloat * LayerSceneGraph::Camera::getViewMatrix | ( | ) |
Returns the view matrix (a pointer with 16 float values).
GLuint LayerSceneGraph::Camera::getWidth | ( | ) |
Returns the width of the screen (device coordinates)
void LayerSceneGraph::Camera::setModelMatrix | ( | GLfloat * | matrixValues | ) |
Receives a pointer with 16 float values and sets a new model matrix.
void LayerSceneGraph::Camera::setProjectionMatrix | ( | GLfloat * | matrixValues | ) |
Receives a pointer with 16 float values and sets a new projection matrix.
void LayerSceneGraph::Camera::setViewMatrix | ( | GLfloat * | matrixValues | ) |
Receives a pointer with 16 float values and sets a new view matrix.
|
static |
Converts a angle given in degrees to radians unit
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |