#include <Camera.h>
Public Member Functions | |
| Camera (int width, int height) | |
| void | enablePerspective (bool enable) |
| void | setup (int width, int height) const |
| void | setup () const |
| void | setViewport (int width, int height) |
| void | setZoom (double zoom) |
| VolVis::Util::Camera::Camera | ( | int | width, | |
| int | height | |||
| ) |
Constructor. Defines width and height of the viewport. Orthographic projection and a zoom of 1.0 are used by default.
| width | Defines the width of the viewport | |
| height | Defines the height of the viewport |
| void VolVis::Util::Camera::enablePerspective | ( | bool | enable | ) |
Defines if the camera uses a perspective or an orthographic projection.
| enable | if true, perspective projection is used, otherwise orthographic projection. |
| void VolVis::Util::Camera::setup | ( | int | width, | |
| int | height | |||
| ) | const |
Defines the OpenGL projection matrix according to the defined camera settings. The width and height for the viewport are defined by the parameters.
| width | width of viewport, only used in this method call. Doesn't affect the value defined with setViewport. | |
| height | height of viewport, only used in this method call. Doesn't affect the value defined with setViewport. |
| void VolVis::Util::Camera::setup | ( | ) | const |
Defines the OpenGL projection matrix according to the defined camera settings. The width and height for the viewport are used as set with the method setZoom or in the constructor.
| void VolVis::Util::Camera::setViewport | ( | int | width, | |
| int | height | |||
| ) |
Defines a new viewport which is used in the setup method without parameters.
| width | new width of viewport | |
| height | new height of viewport |
| void VolVis::Util::Camera::setZoom | ( | double | zoom | ) |
Defines a zoom of the camera. A greater value than 1.0 means zoom in, a smaller value means zoom out.
| zoom | new value for the camera zoom. This value has to be greater than zero |
1.5.1-p1