Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
Loading...
Searching...
No Matches
Ult::Camera Class Reference

#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
 

Detailed Description

Represents a movable position and look-at target in 3d space.

Constructor & Destructor Documentation

◆ Camera() [1/2]

Ult::Camera::Camera ( )

Default camera constructor.

◆ Camera() [2/2]

Ult::Camera::Camera ( const Vector3D & pos,
const Vector3D & lookAt,
const Vector3D & up,
const Vector3D & right )

Camera constructor with position, orientation, and target.

Member Function Documentation

◆ GetLookDirection()

Vector3D Ult::Camera::GetLookDirection ( ) const
inline

Get a copy of the camera's target look-at position.

◆ GetPosition()

Vector3D Ult::Camera::GetPosition ( ) const
inline

Get a copy of the camera's position.

◆ GetRightDirection()

Vector3D Ult::Camera::GetRightDirection ( ) const
inline

Get a copy of the camera's orientation right vector.

◆ GetUpDirection()

Vector3D Ult::Camera::GetUpDirection ( ) const
inline

Get a copy of the camera's orientation up vector.

◆ MoveCamera()

void Ult::Camera::MoveCamera ( const Vector3D & direction,
const float speed )

Move the camera position forward in its current orientation.

◆ RotateCamera() [1/2]

void Ult::Camera::RotateCamera ( const float angle,
const Vector3D & axis )

Rotate the camera about the given axis.

Parameters
angleRotation angle in degrees.
axisThe rotation axis.

◆ RotateCamera() [2/2]

void Ult::Camera::RotateCamera ( const float deltaX,
const float deltaY )

Rotate the camera about its x and y axis.

Parameters
deltaXx axis rotation angle in degrees.
deltaYy axis rotation angle in degrees.

◆ SetLookDirection()

void Ult::Camera::SetLookDirection ( const Vector3D & at)
inline

Set the target position to look towards.

◆ SetPosition()

void Ult::Camera::SetPosition ( const Vector3D & pos)
inline

Set where the camera is located in 3d space.

◆ SetRightDirection()

void Ult::Camera::SetRightDirection ( const Vector3D & right)
inline

Set the right vector for the camera's orientation.

◆ SetUpDirection()

void Ult::Camera::SetUpDirection ( const Vector3D & up)
inline

Set the up vector for the camera's orientation.

◆ StrafeCam()

void Ult::Camera::StrafeCam ( const float speed)

Move the camera right in its current orientation.


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