VolVis::Util::Camera Class Reference

#include <Camera.h>


Detailed Description

This class contains camera settings and can be used for defining the according OpenGl projection matrix.


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)


Constructor & Destructor Documentation

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.

Parameters:
width Defines the width of the viewport
height Defines the height of the viewport


Member Function Documentation

void VolVis::Util::Camera::enablePerspective ( bool  enable  ) 

Defines if the camera uses a perspective or an orthographic projection.

Parameters:
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.

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.

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.

Parameters:
zoom new value for the camera zoom. This value has to be greater than zero


The documentation for this class was generated from the following file:
Generated on Wed Dec 5 12:27:31 2007 for VolVis by  doxygen 1.5.1-p1