Public Methods | |
Camera () | |
~Camera () | |
void | loadConfigData (void) |
void | resetView () |
void | lookTo (float x, float y, float z) |
void | getBoundingBox (SCENE *scene) |
void | setPerspective () |
Data Fields | |
ViewModel | vm |
vec3 | BoundingBoxMin |
vec3 | BoundingBoxMax |
unsigned int | perspective_znear |
unsigned int | perspective_zfar |
unsigned int | perspective_angle |
This class contains a viewmodel which keeps up to date the values of the up, forward and side directions. The bounding box of the scene is computed here and the perspective parameters are maintened here.
|
Initialises Camera properties |
|
|
|
Gets the bounding box of the scene. Its the smallest cuboid containing all the points of the scene object. |
|
Loads config data from file user.ini |
|
Looks to the point defined by 3D coordinates x,y,z
|
|
Resets the point of view to its initial value defined in user.ini |
|
Sets the perspective with the right aspect ratio the width and height of the viewport is taken with the glGetIntegerv (GL_VIEWPORT, viewport) procedure. |
|
"max" corner of the bounding box |
|
"min" corner of the bounding box |
|
angle of view |
|
distance between eye and far clipping plane |
|
distance between eye and near clipping plane |
|
The ViewModel is the heart of the camera it updates up, side and forward directions |