Camera Class Reference

#include <camera.h>

Inherited by Tracer.

Inheritance diagram for Camera:

Inheritance graph
[legend]
Collaboration diagram for Camera:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Camera (void)
 Camera (const GLVector3d &pos, const GLVector3d &ref, const GLVector3d &up)
virtual ~Camera (void)
GLVector3d & getPos (GLVector3d &pos) const
GLVector3d & getDir (GLVector3d &dir) const
GLVector3d & getRef (GLVector3d &ref) const
GLVector3d & getUp (GLVector3d &up) const
GLVector3d getPos () const
GLVector3d getDir () const
GLVector3d getRef () const
GLVector3d getUp () const
void setPos (const GLVector3d &pos)
void setDir (const GLVector3d &dir)
void setRef (const GLVector3d &ref)
void setUp (const GLVector3d &up)
void setPerspective (const GLdouble fovx, const GLdouble aspect, const GLdouble zNear, const GLdouble zFar)
void computeLookAt (GLMatrix4d &m)
void computePerspective (GLMatrix4d &m)
void computeFrustum ()
Frustum getFrustum () const
void gluLookAt ()
void gluPerspective ()
void setView ()

Protected Attributes

GLVector3d mPosition
 camera position (eye point)
GLVector3d mReferencePoint
 reference point (the point we are looking at)
GLVector3d mUpVector
 where is "UP", not necesary perpendicular to mPosition nor mReferencePoint
Frustum mFrustum

Private Attributes

Perspective mPerspective
bool mPerspectiveChanged

Classes

struct  Perspective

Detailed Description

Definition at line 10 of file camera.h.


Constructor & Destructor Documentation

Camera::Camera void   ) 
 

Definition at line 7 of file camera.cpp.

Camera::Camera const GLVector3d &  pos,
const GLVector3d &  ref,
const GLVector3d &  up
 

Definition at line 14 of file camera.cpp.

Camera::~Camera void   )  [virtual]
 

Definition at line 18 of file camera.cpp.


Member Function Documentation

void Camera::computeFrustum  ) 
 

Definition at line 106 of file camera.cpp.

References computeLookAt(), computePerspective(), mFrustum, and Frustum::set().

Referenced by LayerGame::update().

Here is the call graph for this function:

void Camera::computeLookAt GLMatrix4d &  m  ) 
 

Definition at line 33 of file camera.cpp.

References getPos(), getRef(), and getUp().

Referenced by computeFrustum(), and gluLookAt().

Here is the call graph for this function:

void Camera::computePerspective GLMatrix4d &  m  ) 
 

Definition at line 62 of file camera.cpp.

References Camera::Perspective::aspect, Camera::Perspective::fovx, mPerspective, Camera::Perspective::zFar, and Camera::Perspective::zNear.

Referenced by computeFrustum(), and gluPerspective().

GLVector3d Camera::getDir  )  const [inline]
 

Definition at line 75 of file camera.h.

GLVector3d & Camera::getDir GLVector3d &  dir  )  const [inline]
 

Definition at line 70 of file camera.h.

References mPosition, and mReferencePoint.

Referenced by LayerGame::update().

Frustum Camera::getFrustum  )  const [inline]
 

Definition at line 47 of file camera.h.

References mFrustum.

GLVector3d Camera::getPos  )  const [inline]
 

Definition at line 74 of file camera.h.

Referenced by computeLookAt().

GLVector3d & Camera::getPos GLVector3d &  pos  )  const [inline]
 

Definition at line 69 of file camera.h.

References mPosition.

GLVector3d Camera::getRef  )  const [inline]
 

Definition at line 76 of file camera.h.

Referenced by computeLookAt().

GLVector3d & Camera::getRef GLVector3d &  ref  )  const [inline]
 

Definition at line 71 of file camera.h.

References mReferencePoint.

GLVector3d Camera::getUp  )  const [inline]
 

Definition at line 77 of file camera.h.

Referenced by computeLookAt().

GLVector3d & Camera::getUp GLVector3d &  up  )  const [inline]
 

Definition at line 72 of file camera.h.

References mUpVector.

void Camera::gluLookAt  ) 
 

Definition at line 92 of file camera.cpp.

References computeLookAt().

Referenced by setView().

Here is the call graph for this function:

void Camera::gluPerspective  ) 
 

Definition at line 99 of file camera.cpp.

References computePerspective().

Referenced by setView().

Here is the call graph for this function:

void Camera::setDir const GLVector3d &  dir  )  [inline]
 

Definition at line 80 of file camera.h.

References mPosition, and mReferencePoint.

Referenced by LayerGame::update().

void Camera::setPerspective const GLdouble  fovx,
const GLdouble  aspect,
const GLdouble  zNear,
const GLdouble  zFar
 

Definition at line 21 of file camera.cpp.

References Camera::Perspective::aspect, Camera::Perspective::fovx, mPerspective, mPerspectiveChanged, Camera::Perspective::zFar, and Camera::Perspective::zNear.

Referenced by GameClient::getCamera(), and LayerGame::setView().

void Camera::setPos const GLVector3d &  pos  )  [inline]
 

Definition at line 79 of file camera.h.

References mPosition.

void Camera::setRef const GLVector3d &  ref  )  [inline]
 

Definition at line 81 of file camera.h.

References mReferencePoint.

void Camera::setUp const GLVector3d &  up  )  [inline]
 

Definition at line 82 of file camera.h.

References mUpVector.

void Camera::setView  ) 
 

Definition at line 117 of file camera.cpp.

References gluLookAt(), and gluPerspective().

Referenced by LayerGame::setView().

Here is the call graph for this function:


Member Data Documentation

Frustum Camera::mFrustum [protected]
 

Definition at line 61 of file camera.h.

Referenced by computeFrustum(), and getFrustum().

Perspective Camera::mPerspective [private]
 

Definition at line 65 of file camera.h.

Referenced by computePerspective(), and setPerspective().

bool Camera::mPerspectiveChanged [private]
 

Definition at line 66 of file camera.h.

Referenced by setPerspective().

GLVector3d Camera::mPosition [protected]
 

camera position (eye point)

Definition at line 58 of file camera.h.

Referenced by getDir(), getPos(), setDir(), and setPos().

GLVector3d Camera::mReferencePoint [protected]
 

reference point (the point we are looking at)

Definition at line 59 of file camera.h.

Referenced by getDir(), getRef(), setDir(), and setRef().

GLVector3d Camera::mUpVector [protected]
 

where is "UP", not necesary perpendicular to mPosition nor mReferencePoint

Definition at line 60 of file camera.h.

Referenced by getUp(), and setUp().


The documentation for this class was generated from the following files:
Generated on Wed Apr 12 14:12:18 2006 for bjs by  doxygen 1.4.5