OpenGL::Camera Class Reference

#include <Camera.h>

List of all members.

Public Member Functions

 Camera (Math::Vector3d pos)
void move (float dist)
void strafe (float dist)
void up (float dist)
void pitch (float angle, bool limitRotation=false)
void yaw (float angle)
Math::Vector3d getPosition () const
Math::Vector3d getViewDirection () const
void transform () const


Detailed Description

Represents a Camera with position and orientation. The Camera is defined in a right-handed coordinate system.


Constructor & Destructor Documentation

OpenGL::Camera::Camera Math::Vector3d  pos  ) 
 

Constructs a new Camera with the given world position. By default the Camera is looking along the negative Z-axis, with the pitch and yaw angles set to 0.

Parameters:
pos the world position.


Member Function Documentation

Math::Vector3d OpenGL::Camera::getPosition  )  const
 

Returns the world position of the Camera.

Returns:
the world position.

Math::Vector3d OpenGL::Camera::getViewDirection  )  const
 

Returns the normalized view direction vector of the Camera.

Returns:
the normalized view direction vector.

void OpenGL::Camera::move float  dist  ) 
 

Moves the Camera forward or backward according to the orientation and the given distance. Positive distance -> forward. Negative distance -> backward.

Parameters:
dist the distance to move the Camera.

void OpenGL::Camera::pitch float  angle,
bool  limitRotation = false
 

Increases the pitch angle with the given angle. Positive angle -> clockwise around the X-axis. Negative angle -> counter-clockwise around the X-axis.

Parameters:
angle the amount to increase the pitch angle with.
limitRotation limit the rotation, disallowing loops.

void OpenGL::Camera::strafe float  dist  ) 
 

Moves the Camera left or right according to the orientation and the given distance. Positive distance -> right. Negative distance -> left.

Parameters:
dist the distance to move the Camera.

void OpenGL::Camera::transform  )  const
 

Transforms the Camera according to the position and the orientation.

void OpenGL::Camera::up float  dist  ) 
 

Moves the Camera up or down according to the orientation and the given distance. Positive distance -> up. Negative distance -> down.

Parameters:
dist the distance to move the Camera.

void OpenGL::Camera::yaw float  angle  ) 
 

Increases the yaw angle with the given angle. Positive angle -> clockwise around the Y-axis. Negative angle -> counter-clockwise around the Y-axis.

Parameters:
angle the amount to increase the yaw angle with.


The documentation for this class was generated from the following files:
Generated on Fri Jun 16 08:42:52 2006 for GPU Thesis by  doxygen 1.4.6-NO