#include "Camera.h"
Public Member Functions | |
Camera () | |
Default Constructor. | |
Camera (const Point3f &eye, const Point3f ¢er, const Vector3f &upVec) | |
Constructor. | |
void | Set (const Point3f &eye, const Point3f ¢er, 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. |
Definition at line 18 of file Camera.h.
Sets the viewing paramaters.
[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.
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.
[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] |
void Camera::Zoom | ( | float | d | ) | [inline] |
Zooms the camera in.
[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.
[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.
[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().
Vector3f Camera::ViewDirection | ( | ) | const [inline] |
Gets the view direction.
Definition at line 188 of file Camera.h.
Referenced by RTVolumeRenderer::Draw().