Jamie Slowgrove - PGG Assignment 2
 All Classes Namespaces Files Functions Variables Typedefs Macros
Public Member Functions | Private Attributes | List of all members
Camera Class Reference

Creates an Camera object. More...

#include <Camera.h>

Collaboration diagram for Camera:
Collaboration graph

Public Member Functions

 Camera ()
 
 ~Camera ()
 
void input (SDL_Event &incomingEvent)
 
void update (float dt)
 
void moveCamera (glm::vec3 translation)
 
void moveCameraAlongX (float translateX)
 
void moveCameraAlongY (float translateY)
 
void moveCameraAlongZ (float translateZ)
 
void rotateCamera (glm::vec3 rotation)
 
void rotateCameraAlongX (float rotationX)
 
void rotateCameraAlongY (float rotationY)
 
void rotateCameraAlongZ (float rotationZ)
 
glm::mat4 getView ()
 
glm::mat4 getProjection ()
 
glm::vec3 getOrientation ()
 
void setPosition (glm::vec3 position)
 

Private Attributes

glm::mat4 view
 
glm::mat4 projection
 
glm::vec3 orientation
 
float moveSpeed
 
float rotateSpeed
 
bool up
 
bool down
 
bool left
 
bool right
 
bool forwards
 
bool backwards
 
bool rotateRight
 
bool rotateLeft
 
bool rotateUp
 
bool rotateDown
 
bool rollLeft
 
bool rollRight
 
glm::vec2 mouse
 

Detailed Description

Creates an Camera object.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

Camera::Camera ( )

Constructs a Camera object.

Camera::~Camera ( )

Destructs an Camera object.

Member Function Documentation

glm::vec3 Camera::getOrientation ( )

Getter # Returns the Camera orientation.

Returns
The Camera orientation.
glm::mat4 Camera::getProjection ( )

Getter # Returns the Camera projection matrix.

Returns
The Camera projection matrix.

Here is the caller graph for this function:

glm::mat4 Camera::getView ( )

Getter # Returns the Camera view matrix.

Returns
The Camera view matrix.

Here is the caller graph for this function:

void Camera::input ( SDL_Event &  incomingEvent)

Handles inputs for the Camera.

Parameters
incomingEventA reference to the input event.
void Camera::moveCamera ( glm::vec3  translation)

Moves the Camera using the translation.

Parameters
translationThe translation.
void Camera::moveCameraAlongX ( float  translateX)

Moves the Camera along the X axis.

Parameters
translateXThe translation along the X axis.

Here is the caller graph for this function:

void Camera::moveCameraAlongY ( float  translateY)

Moves the Camera along the Y axis.

Parameters
translateYThe translation along the Y axis.

Here is the caller graph for this function:

void Camera::moveCameraAlongZ ( float  translateZ)

Moves the Camera along the Z axis.

Parameters
translateZThe translation along the Z axis.

Here is the caller graph for this function:

void Camera::rotateCamera ( glm::vec3  rotation)

Rotates the Camera using the rotation.

Parameters
rotationThe rotation.
void Camera::rotateCameraAlongX ( float  rotationX)

Rotate the Camera along the X axis.

Parameters
rotationXThe rotation along the X axis.

Here is the caller graph for this function:

void Camera::rotateCameraAlongY ( float  rotationY)

Rotate the Camera along the Y axis.

Parameters
rotationYThe rotation along the Y axis.

Here is the caller graph for this function:

void Camera::rotateCameraAlongZ ( float  rotationZ)

Rotate the Camera along the Z axis.

Parameters
rotationZThe rotation along the Z axis.

Here is the caller graph for this function:

void Camera::setPosition ( glm::vec3  position)

Setter # Sets the position of the Camera.

Parameters
positionThe new position.

Here is the caller graph for this function:

void Camera::update ( float  dt)

A function to update the Camera.

Parameters
dtThe delta time.

Here is the call graph for this function:

Member Data Documentation

bool Camera::backwards
private
bool Camera::down
private
bool Camera::forwards
private
bool Camera::left
private
glm::vec2 Camera::mouse
private

Current Mouse position

float Camera::moveSpeed
private

The movement speed of the Camera

glm::vec3 Camera::orientation
private
glm::mat4 Camera::projection
private
bool Camera::right
private
bool Camera::rollLeft
private
bool Camera::rollRight
private
bool Camera::rotateDown
private
bool Camera::rotateLeft
private
bool Camera::rotateRight
private
float Camera::rotateSpeed
private

The rotation speed of the Camera

bool Camera::rotateUp
private
bool Camera::up
private

Camera movement

glm::mat4 Camera::view
private

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