#include <camera.h>
Public Member Functions | |
| Camera () | |
| Creates a new Camera object. | |
| Vec3f | Position () |
| Returns this Camera's position. | |
| Vec3d | View () |
| Returns the view vector of this camera. | |
| Vec3d | UpVector () |
| Returns a vector pointing up with respect to the view. | |
| Vec3d | Strafe () |
| Returns this Camera's strafe vector. | |
| void | PositionCamera (double xpos, double ypos, double zpos, double xview, double yview, double zview, double xup, double yup, double zup) |
| Relocates and reorients this Camera. | |
| void | PositionCamera (Vec3d pos, Vec3d view, Vec3d up) |
| Relocates and reorients this Camera. | |
| void | RotateView (double angle, Vec3d axis) |
| Rotates the camera a given ammount around a given axis. | |
| void | RotateView (double angle, double X, double Y, double Z) |
| Rotates the camera a given ammount around a given axis. | |
| void | SetViewByMouse (Window window) |
| Updates the view and up vectors based on mouse movement. | |
| void | StrafeCamera (double speed) |
| Moves the camera along its strafe axis a given distance. | |
| void | MoveCamera (double speed) |
| Moves the camera along its view vector a given number of units. | |
| void | Update () |
| Recalculates the strafe vector. | |
| void | Look () |
| Calls gluLookAt to tell OpenGL where to render from. | |
| void | RotateHorizontal (float angle) |
| Write brief comment for RotateHorizontal here. | |
| void | RotateVertical (float angle) |
| Write brief comment for RotateVertical here. | |
Private Member Functions | |
| Vec3f | GetUpVector () |
| Write brief comment for GetUpVector here. | |
| Vec3f | GetRightVector () |
| Write brief comment for GetRightVector here. | |
| Vec3f | GetForwardVector () |
| Write brief comment for GetForwardVector here. | |
| void | UpdateVectors () |
Private Attributes | |
| Vec3f | m_vPosition |
| Vec3f | m_vView |
| Vec3f | m_vUpVector |
| Vec3f | m_vStrafe |
The Camera class maintains location, view, and orientation (up view) vectors. The Camera can be moved and rotated in any direction. It includes a wrapper, Look(), for gluLookAt.
| OpenArena::Camera::Camera | ( | ) |
| Vec3f OpenArena::Camera::GetForwardVector | ( | ) | [private] |
Write brief comment for GetForwardVector here.
| <exception | class> Description of criteria for throwing this exception. |
| Vec3f OpenArena::Camera::GetRightVector | ( | ) | [private] |
Write brief comment for GetRightVector here.
| <exception | class> Description of criteria for throwing this exception. |
| Vec3f OpenArena::Camera::GetUpVector | ( | ) | [private] |
Write brief comment for GetUpVector here.
| <exception | class> Description of criteria for throwing this exception. |
| void OpenArena::Camera::Look | ( | ) |
Calls gluLookAt to tell OpenGL where to render from.
| void OpenArena::Camera::MoveCamera | ( | double | speed | ) |
Moves the camera along its view vector a given number of units.
| speed | The distance to move the camera. |
| Vec3f OpenArena::Camera::Position | ( | ) |
Returns this Camera's position.
Relocates and reorients this Camera.
| pos | The new position vector. | |
| view | The new view vector. | |
| up | The new up vector. |
| void OpenArena::Camera::PositionCamera | ( | double | xpos, | |
| double | ypos, | |||
| double | zpos, | |||
| double | xview, | |||
| double | yview, | |||
| double | zview, | |||
| double | xup, | |||
| double | yup, | |||
| double | zup | |||
| ) |
Relocates and reorients this Camera.
| xpos | The x-coordinate of the new position vector. | |
| ypos | The y-coordinate of the new position vector. | |
| zpos | The z-coordinate of the new position vector. | |
| xview | The x-coordinate of the new view vector. | |
| yview | The y-coordinate of the new view vector. | |
| zview | The z-coordinate of the new view vector. | |
| xup | The x-coordinate of the new up vector. | |
| yup | The y-coordinate of the new up vector. | |
| zup | The z-coordinate of the new up vector. |
| void OpenArena::Camera::RotateHorizontal | ( | float | angle | ) |
Write brief comment for RotateHorizontal here.
| angle | Description of parameter angle. |
| <exception | class> Description of criteria for throwing this exception. |
| void OpenArena::Camera::RotateVertical | ( | float | angle | ) |
Write brief comment for RotateVertical here.
| angle | Description of parameter angle. |
| <exception | class> Description of criteria for throwing this exception. |
| void OpenArena::Camera::RotateView | ( | double | angle, | |
| double | X, | |||
| double | Y, | |||
| double | Z | |||
| ) |
Rotates the camera a given ammount around a given axis.
| angle | The number of degrees to rotate. | |
| X | The x component of the vector representing the axis to rotate around | |
| Y | The y component of the vector representing the axis to rotate around | |
| Z | The z component of the vector representing the axis to rotate around |
| void OpenArena::Camera::RotateView | ( | double | angle, | |
| Vec3d | axis | |||
| ) |
Rotates the camera a given ammount around a given axis.
| angle | The number of degrees to rotate. | |
| axis | A vector representing the axis to rotate around. |
| void OpenArena::Camera::SetViewByMouse | ( | Window | window | ) |
Updates the view and up vectors based on mouse movement.
| window | The Window used to get the mouse coordinates. |
| Vec3f OpenArena::Camera::Strafe | ( | ) |
Returns this Camera's strafe vector.
The strafe axis is an axis perpendicular to both the up vector and the view vector.
| void OpenArena::Camera::StrafeCamera | ( | double | speed | ) |
Moves the camera along its strafe axis a given distance.
| speed | The distance to move. |
| void OpenArena::Camera::Update | ( | ) |
Recalculates the strafe vector.
| void OpenArena::Camera::UpdateVectors | ( | ) | [private] |
| Vec3f OpenArena::Camera::UpVector | ( | ) |
Returns a vector pointing up with respect to the view.
| Vec3f OpenArena::Camera::View | ( | ) |
Returns the view vector of this camera.
Vec3f OpenArena::Camera::m_vPosition [private] |
Vec3f OpenArena::Camera::m_vStrafe [private] |
Vec3f OpenArena::Camera::m_vUpVector [private] |
Vec3f OpenArena::Camera::m_vView [private] |
1.4.7