Camera Class Reference

Represents a camera that rotates around a fixed point. More...

#include "Camera.h"

Collaboration diagram for Camera:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Camera ()
 Default Constructor.
 Camera (const Point3f &eye, const Point3f &center, const Vector3f &upVec)
 Constructor.
void Set (const Point3f &eye, const Point3f &center, const Vector3f &upVec)
 Sets the viewing paramaters.
Matrixf GetViewMatrix () const
 Constructs the view matrix.
void Move (const Vector3f &amt)
 Moves the camera by the given amount.
void SetMinRadius (float r)
 Sets the radius from the lookAt location that the camera will not enter.
void Zoom (float d)
 Zooms the camera in.
void RotateRight (float a)
 Rotates the camera to the right about the lookAt position.
void RotateUp (float a)
 Rotates the camera up.
void Get (Point3f *eye, Point3f *center, Vector3f *rightVec, Vector3f *upVec, Vector3f *forwardVec) const
 Gets the view paramaters and camera coordinate system.
Vector3f ViewDirection () const
 Gets the view direction.


Detailed Description

Represents a camera that rotates around a fixed point.

Definition at line 18 of file Camera.h.


Constructor & Destructor Documentation

Camera::Camera ( const Point3f eye,
const Point3f center,
const Vector3f upVec 
) [inline]

Constructor.

Parameters:
[in] eye the position of the camera.
[in] center the look at position.
[in] upVec a vector representing the up direction.

Definition at line 37 of file Camera.h.

References Set().


Member Function Documentation

void Camera::Set ( const Point3f eye,
const Point3f center,
const Vector3f upVec 
) [inline]

Sets the viewing paramaters.

Parameters:
[in] eye the position of the camera.
[in] center the look at position.
[in] upVec a vector representing the up direction.

Definition at line 49 of file Camera.h.

References Vector3< T >::Cross().

Referenced by Camera().

Matrixf Camera::GetViewMatrix (  )  const [inline]

Constructs the view matrix.

Returns:
the view matrix.

Definition at line 64 of file Camera.h.

References Matrix< T >::MakeView().

Referenced by RTVolumeRenderer::Draw().

void Camera::Move ( const Vector3f amt  )  [inline]

Moves the camera by the given amount.

Parameters:
[in] amt the ammount to move the camera.

Definition at line 76 of file Camera.h.

References Vector3< T >::x, and Vector3< T >::z.

void Camera::SetMinRadius ( float  r  )  [inline]

Sets the radius from the lookAt location that the camera will not enter.

Parameters:
[in] r the minimum radius.

Definition at line 92 of file Camera.h.

void Camera::Zoom ( float  d  )  [inline]

Zooms the camera in.

Parameters:
[in] d the ammount to zoom in, negative value will zoom out.

Definition at line 102 of file Camera.h.

References Sphere::c, Ray::d, Inside(), Intersect(), Ray::p, and Sphere::r.

Referenced by RTVolumeRenderer::KeyDown(), and RTVolumeRenderer::MouseWheel().

void Camera::RotateRight ( float  a  )  [inline]

Rotates the camera to the right about the lookAt position.

Parameters:
[in] a the angle in radians to rotate, negative value will rotate the camera to the left.

Definition at line 134 of file Camera.h.

References Vector3< T >::Cross(), Matrix< T >::MakeRotationY(), and Matrix< T >::Transform().

Referenced by RTVolumeRenderer::KeyDown(), and RTVolumeRenderer::MouseMove().

void Camera::RotateUp ( float  a  )  [inline]

Rotates the camera up.

Parameters:
[in] a the angle in radians to rotate, negative value will rotate the camera down.

Definition at line 150 of file Camera.h.

References Vector3< T >::Cross(), Matrix< T >::MakeRotation(), and Matrix< T >::Transform().

Referenced by RTVolumeRenderer::KeyDown(), and RTVolumeRenderer::MouseMove().

void Camera::Get ( Point3f eye,
Point3f center,
Vector3f rightVec,
Vector3f upVec,
Vector3f forwardVec 
) const [inline]

Gets the view paramaters and camera coordinate system.

Parameters:
[out] eye the cameras position.
[out] center the cameras lookAt position.
[out] rightVec the cameras x-axis.
[out] upVec the cameras y-axis.
[out] forwardVec the cameras z-axis.

Definition at line 169 of file Camera.h.

Vector3f Camera::ViewDirection (  )  const [inline]

Gets the view direction.

Returns:
the view direction.

Definition at line 188 of file Camera.h.

Referenced by RTVolumeRenderer::Draw().


The documentation for this class was generated from the following file:

Generated on Thu Jan 15 00:58:04 2009 for RTVolumeRendering by  doxygen 1.5.6