Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

VPCamera Class Reference

Virtual camera. More...

#include <vpcamera.h>

List of all members.

Public Types

enum  ProjectionType { ORTHOGRAPHIC, PERSPECTIVE }

Public Member Functions

 VPCamera ()
 VPCamera (const VPPoint4D &position, const VPPoint4D &focus, const VPPoint4D &upVec)
 VPCamera (const VPCamera &cam)
VPCameraoperator= (const VPCamera &cam)
const std::string & GetDescription () const
 Gets the description associated with the camera.
void SetDescription (const std::string &descriptionValue)
 Sets the description associated with the camera.
ProjectionType GetProjectionType () const
 Gets the projection type (PERSPECTIVE/ORTHOGRAPHIC).
void SetProjectionType (ProjectionType newValue)
 Sets the projection type (PERSPECTIVE/ORTHOGRAPHIC).
float GetAspectRatio () const
 Gets the camera's width/height ratio.
void SetAspectRatio (float newAR)
 Sets the camera's width/height ratio.
float GetNearPlaneDistance () const
 Returns the distance to the near plane.
void SetNearPlaneDistance (float newValue)
 Sets the distance to the near plane.
float GetFarPlaneDistance () const
 Returns the distance to the far plane.
void SetFarPlaneDistance (float newValue)
 Sets the distance to the far plane distance.
float GetFovY () const
 Returns the vertical field of view (in degrees).
void SetFovY (float f)
 Sets the vertical field of view (in degrees).
VPPoint4D GetLocation () const
 Sets the camera location.
void SetLocation (const VPPoint4D &locationValue)
 Returns the camera target (where it is looking at).
VPPoint4D GetTarget () const
 Returns the camera location.
void SetTarget (const VPPoint4D &targetValue)
 Sets the camera target (where it is looking at).
VPPoint4D GetUp () const
 Returns the camera up vector.
void SetUp (const VPPoint4D &upValue)
 Sets the camera up vector.
void SetVisibleVolumeHLimits (double left, double right)
 Sets the horizontal limit coordinates of the orthographic view volume.
void SetVisibleVolumeVLimits (double top, double bottom)
 Sets the vertical limit coordinates of the orthographic view volume.
void SetVisibleVolumeHeight (double newValue)
 The width of the visible is computed using the aspect ratio.
void YawAroundTarget (double radians)
 Rotates the Camera around the axis defined by the target and up vector.
void Yaw (double radians)
 Rotates the Camera around itself (location and up vector).
void PitchAroundTarget (double radians)
 Rotates the Camera around the axis defined by the target and left vector.
void MoveForward (double distance)
 Moves the camera forward (relative to the camera).
void MoveSideways (double distance)
 Moves the camera sideways.
void MoveUp (double distance)
 Moves the camera up and down.
bool DrawOGL () const

Friends

std::ostream & operator<< (std::ostream &output, const VPCamera &cam)


Detailed Description

Virtual camera.

FixMe: A detailed class description is needed here.

Definition at line 20 of file vpcamera.h.


Member Enumeration Documentation

enum VPCamera::ProjectionType
 

Enumerator:
ORTHOGRAPHIC 
PERSPECTIVE 

Definition at line 23 of file vpcamera.h.


Constructor & Destructor Documentation

VPCamera::VPCamera  ) 
 

Definition at line 54 of file vpcamera.cpp.

References PERSPECTIVE.

VPCamera::VPCamera const VPPoint4D position,
const VPPoint4D focus,
const VPPoint4D upVec
 

Creates a camera.

Parameters:
position [in] Location of the new camera
focus [in] Position at which the new camera is looking at
upVec [in] Up vector specifing camera's orientation

Definition at line 69 of file vpcamera.cpp.

References VPPoint4D::CrossProduct(), VPPoint4D::Normalize(), and PERSPECTIVE.

VPCamera::VPCamera const VPCamera cam  ) 
 

Definition at line 91 of file vpcamera.cpp.

References aspectRatio, description, farPlaneDistance, fovY, location, nearPlaneDistance, projectionType, target, up, vvBottom, vvLeft, vvRight, and vvTop.


Member Function Documentation

bool VPCamera::DrawOGL  )  const
 

Positions a camera using OpenGL commands.

Returns:
false if VPAT was not compiled with OpenGL support.

Definition at line 304 of file vpcamera.cpp.

References VPPoint4D::GetX(), VPPoint4D::GetY(), VPPoint4D::GetZ(), and PERSPECTIVE.

float VPCamera::GetAspectRatio  )  const [inline]
 

Gets the camera's width/height ratio.

Definition at line 41 of file vpcamera.h.

const std::string& VPCamera::GetDescription  )  const [inline]
 

Gets the description associated with the camera.

Definition at line 33 of file vpcamera.h.

float VPCamera::GetFarPlaneDistance  )  const [inline]
 

Returns the distance to the far plane.

Definition at line 49 of file vpcamera.h.

float VPCamera::GetFovY  )  const
 

Returns the vertical field of view (in degrees).

Definition at line 211 of file vpcamera.cpp.

VPPoint4D VPCamera::GetLocation  )  const
 

Sets the camera location.

Definition at line 187 of file vpcamera.cpp.

float VPCamera::GetNearPlaneDistance  )  const [inline]
 

Returns the distance to the near plane.

Definition at line 45 of file vpcamera.h.

ProjectionType VPCamera::GetProjectionType  )  const [inline]
 

Gets the projection type (PERSPECTIVE/ORTHOGRAPHIC).

Definition at line 37 of file vpcamera.h.

VPPoint4D VPCamera::GetTarget  )  const
 

Returns the camera location.

Definition at line 195 of file vpcamera.cpp.

VPPoint4D VPCamera::GetUp  )  const
 

Returns the camera up vector.

Definition at line 203 of file vpcamera.cpp.

void VPCamera::MoveForward double  distance  ) 
 

Moves the camera forward (relative to the camera).

Definition at line 269 of file vpcamera.cpp.

References VPTransform::ApplyTo(), VPTransform::MakeTranslation(), and VPPoint4D::Normalize().

void VPCamera::MoveSideways double  distance  ) 
 

Moves the camera sideways.

Definition at line 279 of file vpcamera.cpp.

References VPTransform::ApplyTo(), VPTransform::MakeRotation(), VPTransform::MakeTranslation(), and VPPoint4D::Normalize().

void VPCamera::MoveUp double  distance  ) 
 

Moves the camera up and down.

Definition at line 293 of file vpcamera.cpp.

References VPTransform::ApplyTo(), VPTransform::MakeTranslation(), and VPPoint4D::Normalize().

VPCamera & VPCamera::operator= const VPCamera cam  ) 
 

Definition at line 112 of file vpcamera.cpp.

References aspectRatio, description, farPlaneDistance, fovY, location, nearPlaneDistance, projectionType, target, up, vvBottom, vvLeft, vvRight, and vvTop.

void VPCamera::PitchAroundTarget double  radians  ) 
 

Rotates the Camera around the axis defined by the target and left vector.

Definition at line 258 of file vpcamera.cpp.

References VPTransform::ApplyTo(), VPPoint4D::CrossProduct(), VPTransform::MakeRotation(), and VPPoint4D::Normalize().

void VPCamera::SetAspectRatio float  newAR  )  [inline]
 

Sets the camera's width/height ratio.

Definition at line 43 of file vpcamera.h.

void VPCamera::SetDescription const std::string &  descriptionValue  ) 
 

Sets the description associated with the camera.

void VPCamera::SetFarPlaneDistance float  newValue  )  [inline]
 

Sets the distance to the far plane distance.

Definition at line 51 of file vpcamera.h.

void VPCamera::SetFovY float  f  ) 
 

Sets the vertical field of view (in degrees).

Definition at line 215 of file vpcamera.cpp.

void VPCamera::SetLocation const VPPoint4D locationValue  ) 
 

Returns the camera target (where it is looking at).

Definition at line 191 of file vpcamera.cpp.

void VPCamera::SetNearPlaneDistance float  newValue  )  [inline]
 

Sets the distance to the near plane.

Definition at line 47 of file vpcamera.h.

void VPCamera::SetProjectionType ProjectionType  newValue  )  [inline]
 

Sets the projection type (PERSPECTIVE/ORTHOGRAPHIC).

Definition at line 39 of file vpcamera.h.

void VPCamera::SetTarget const VPPoint4D targetValue  ) 
 

Sets the camera target (where it is looking at).

Definition at line 199 of file vpcamera.cpp.

void VPCamera::SetUp const VPPoint4D upValue  ) 
 

Sets the camera up vector.

Definition at line 207 of file vpcamera.cpp.

void VPCamera::SetVisibleVolumeHeight double  newValue  ) 
 

The width of the visible is computed using the aspect ratio.

Definition at line 219 of file vpcamera.cpp.

void VPCamera::SetVisibleVolumeHLimits double  left,
double  right
[inline]
 

Sets the horizontal limit coordinates of the orthographic view volume.

Definition at line 69 of file vpcamera.h.

void VPCamera::SetVisibleVolumeVLimits double  top,
double  bottom
[inline]
 

Sets the vertical limit coordinates of the orthographic view volume.

Definition at line 72 of file vpcamera.h.

void VPCamera::Yaw double  radians  ) 
 

Rotates the Camera around itself (location and up vector).

Definition at line 252 of file vpcamera.cpp.

References VPTransform::ApplyTo(), and VPTransform::MakeRotation().

void VPCamera::YawAroundTarget double  radians  ) 
 

Rotates the Camera around the axis defined by the target and up vector.

Definition at line 246 of file vpcamera.cpp.

References VPTransform::ApplyTo(), and VPTransform::MakeRotation().


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  output,
const VPCamera cam
[friend]
 


The documentation for this class was generated from the following files:
Generated on Tue Sep 6 10:00:13 2005 for VPAT by  doxygen 1.4.4