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

Creates a Ring object that inherits Entity. More...

#include <Ring.h>

Inheritance diagram for Ring:
Inheritance graph
Collaboration diagram for Ring:
Collaboration graph

Public Member Functions

 Ring (Model *model, float scaleValue, int AI)
 
 ~Ring ()
 
void update (float dt)
 
void typeZeroAI (float dt)
 
void typeOneAI (float dt)
 
void typeTwoAI (float dt)
 
void typeThreeAI (float dt)
 
void typeFourAI (float dt)
 
- Public Member Functions inherited from Entity
 Entity (Model *model, float scaleValue)
 
virtual ~Entity ()
 
void draw (glm::mat4 &viewMatrix, glm::mat4 &projMatrix)
 
void setPosition (glm::vec3 position)
 
void setPosition (float x, float y, float z)
 
void rotateX (float angle)
 
void rotateY (float angle)
 
void rotateZ (float angle)
 
void setScale (float scaleValue)
 
void move (glm::vec3 movement)
 
void moveX (float movement)
 
void moveY (float movement)
 
void moveZ (float movement)
 
void setMoveSpeed (float moveSpeed)
 
glm::vec3 getPosition ()
 
glm::vec3 getOrientation ()
 
float getScale ()
 

Private Attributes

int AI
 
float moveSpeedAI
 
float scaleSpeedAI
 
float circleAngle
 
float circleRadius
 
glm::vec2 directionXY
 
float scaleDirection
 

Additional Inherited Members

- Protected Attributes inherited from Entity
Modelmodel
 
glm::vec3 rotation
 
glm::vec3 position
 
float scaleValue
 
float moveSpeed
 
float rotateSpeed
 

Detailed Description

Creates a Ring object that inherits Entity.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

Ring::Ring ( Model model,
float  scaleValue,
int  AI 
)

Constructs a Ring Object. Creates a Ring Object with a Model using the shader file locations, the obj file location and OpenGL.

Parameters
modelA pointer to the model.
scaleValueThe scale of the Model.
AIThe Ring AI type (number between 0 and 6).
Ring::~Ring ( )

Destructs a Ring Object. Destructs the Ring Object deleting the Ring Object from memory.

Member Function Documentation

void Ring::typeFourAI ( float  dt)

Apply the action of AI type 4. The ring moves in a circle.

Parameters
dtThe delta time.

Here is the caller graph for this function:

void Ring::typeOneAI ( float  dt)

Apply the action of AI type 1. The ring moves right and left.

Parameters
dtThe delta time.

Here is the call graph for this function:

Here is the caller graph for this function:

void Ring::typeThreeAI ( float  dt)

Apply the action of AI type 3. The ring moves scales up and down.

Parameters
dtThe delta time.

Here is the caller graph for this function:

void Ring::typeTwoAI ( float  dt)

Apply the action of AI type 2. The ring moves forwards and backwards.

Parameters
dtThe delta time.

Here is the call graph for this function:

Here is the caller graph for this function:

void Ring::typeZeroAI ( float  dt)

Apply the action of AI type 0. The ring does nothing.

Parameters
dtThe delta time.

Here is the caller graph for this function:

void Ring::update ( float  dt)
virtual

A function that updates the Ring

Parameters
dtThe delta time.

Implements Entity.

Here is the call graph for this function:

Member Data Documentation

int Ring::AI
private

The type of AI that the Ring will use

float Ring::circleAngle
private

Angle for the position of the ring on the circle (use with AI type 4)

float Ring::circleRadius
private

Radius for the circle (use with AI type 4)

glm::vec2 Ring::directionXY
private

The XY move direction for the rings

float Ring::moveSpeedAI
private

The move speed for the AI

float Ring::scaleDirection
private

The scale direction

float Ring::scaleSpeedAI
private

The scale speed for the AI


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