|
Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
|
#include <Camera.h>
Public Member Functions | |
| Camera () | |
| Camera (const Vector3D &pos, const Vector3D &lookAt, const Vector3D &up, const Vector3D &right) | |
| void | MoveCamera (const Vector3D &direction, const float speed) |
| void | StrafeCam (const float speed) |
| void | RotateCamera (const float angle, const Vector3D &axis) |
| void | RotateCamera (const float deltaX, const float deltaY) |
| void | SetPosition (const Vector3D &pos) |
| void | SetLookDirection (const Vector3D &at) |
| void | SetUpDirection (const Vector3D &up) |
| void | SetRightDirection (const Vector3D &right) |
| Vector3D | GetPosition () const |
| Vector3D | GetLookDirection () const |
| Vector3D | GetUpDirection () const |
| Vector3D | GetRightDirection () const |
Represents a movable position and look-at target in 3d space.
| Ult::Camera::Camera | ( | ) |
Default camera constructor.
| Ult::Camera::Camera | ( | const Vector3D & | pos, |
| const Vector3D & | lookAt, | ||
| const Vector3D & | up, | ||
| const Vector3D & | right ) |
Camera constructor with position, orientation, and target.
|
inline |
Get a copy of the camera's target look-at position.
|
inline |
Get a copy of the camera's position.
|
inline |
Get a copy of the camera's orientation right vector.
|
inline |
Get a copy of the camera's orientation up vector.
| void Ult::Camera::MoveCamera | ( | const Vector3D & | direction, |
| const float | speed ) |
Move the camera position forward in its current orientation.
| void Ult::Camera::RotateCamera | ( | const float | angle, |
| const Vector3D & | axis ) |
Rotate the camera about the given axis.
| angle | Rotation angle in degrees. |
| axis | The rotation axis. |
| void Ult::Camera::RotateCamera | ( | const float | deltaX, |
| const float | deltaY ) |
Rotate the camera about its x and y axis.
| deltaX | x axis rotation angle in degrees. |
| deltaY | y axis rotation angle in degrees. |
|
inline |
Set the target position to look towards.
|
inline |
Set where the camera is located in 3d space.
|
inline |
Set the right vector for the camera's orientation.
|
inline |
Set the up vector for the camera's orientation.
| void Ult::Camera::StrafeCam | ( | const float | speed | ) |
Move the camera right in its current orientation.