Jamie Slowgrove - OOT Assignment 1 - A Mission in Afghanistan
 All Classes Namespaces Files Functions Variables Macros
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
GameActor Class Referenceabstract

A class for a GameActor object. More...

#include <GameActor.h>

Inheritance diagram for GameActor:
Inheritance graph
Collaboration diagram for GameActor:
Collaboration graph

Public Member Functions

 GameActor (Ogre::Vector3 position, Ogre::Vector3 orientation, Ogre::Real scale)
 
virtual ~GameActor ()
 
virtual void setUpActor (OgreApplication *application)=0
 
virtual void updateActor (float dt)=0
 
std::shared_ptr< Ogre::SceneNode > getActorNode ()
 
std::string getActorID ()
 
Ogre::Vector3 getPosition ()
 
void setPosition (Ogre::Vector3 position)
 
void setX (float x)
 
void setY (float y)
 
void setZ (float z)
 
Ogre::Vector3 getOrientation ()
 
void setOrientation (Ogre::Vector3 orientation)
 
void setXOrientation (float xOrientation)
 
void setYOrientation (float yOrientation)
 
void setZOrientation (float zOrientation)
 
Ogre::Real getScale ()
 
void setScale (Ogre::Real scale)
 
void changePosition (Ogre::Vector3 position)
 

Protected Attributes

std::shared_ptr< Ogre::SceneNode > gameActorNode
 
Ogre::Vector3 position
 
Ogre::Vector3 orientation
 
Ogre::Real scale
 
unsigned int actorID
 

Static Protected Attributes

static unsigned int actorIDGenerator = 0
 

Detailed Description

A class for a GameActor object.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

GameActor::GameActor ( Ogre::Vector3  position,
Ogre::Vector3  orientation,
Ogre::Real  scale 
)

Constructs the GameActor object.

Parameters
Ogre::Vector3The position of the GameActor.
Ogre::Vector3The orientation of the GameActor.
Ogre::RealThe scale of the GameActor.
GameActor::~GameActor ( )
virtual

A virtual destructor for the GameActor object.

Member Function Documentation

void GameActor::changePosition ( Ogre::Vector3  position)

Changes the position of the GameActor.

Parameters
Ogre::Vector3The new position of the GameActor.

Here is the call graph for this function:

std::string GameActor::getActorID ( )

Getter # Gets the actorID of the GameActor.

Returns
std::string The actorID of the GameActor.

Here is the caller graph for this function:

std::shared_ptr< Ogre::SceneNode > GameActor::getActorNode ( )

Getter # Gets the node of the GameActor.

Returns
std::shared_ptr<Ogre::SceneNode> A pointer to the node of the GameActor.
Ogre::Vector3 GameActor::getOrientation ( )

Getter # Gets the orientation of the GameActor.

Returns
Ogre::Vector3 The orientation of the GameActor.
Ogre::Vector3 GameActor::getPosition ( )

Getter # Gets the position of the GameActor.

Returns
Ogre::Vector3 The position of the GameActor.

Here is the caller graph for this function:

Ogre::Real GameActor::getScale ( )

Getter # Gets the scale of the GameActor.

Returns
Ogre::Real The scale of the GameActor.
void GameActor::setOrientation ( Ogre::Vector3  orientation)

Setter # Sets the orientation of the GameActor.

Parameters
Ogre::Vector3The new orientation of the GameActor.
void GameActor::setPosition ( Ogre::Vector3  position)

Setter # Sets the position of the GameActor.

Parameters
Ogre::Vector3The new position of the GameActor.

Here is the caller graph for this function:

void GameActor::setScale ( Ogre::Real  scale)

Setter # Sets the scale of the GameActor.

Parameters
Ogre::RealThe new scale of the GameActor.
virtual void GameActor::setUpActor ( OgreApplication application)
pure virtual

A pure virtual function for setting up the GameActor.

Parameters
OgreApplicationA pointer to the application.

Implemented in Helicopter, Rotor, TurretBarrel, Turret, and Projectile.

void GameActor::setX ( float  x)

Setter # Sets the x position of the GameActor.

Parameters
floatThe new x position of the GameActor.
void GameActor::setXOrientation ( float  xOrientation)

Setter # Sets the x orientation of the GameActor.

Parameters
floatThe new x orientation of the GameActor.
void GameActor::setY ( float  y)

Setter # Sets the y position of the GameActor.

Parameters
floatThe new y position of the GameActor.
void GameActor::setYOrientation ( float  yOrientation)

Setter # Sets the y orientation of the GameActor.

Parameters
floatThe new y orientation of the GameActor.
void GameActor::setZ ( float  z)

Setter # Sets the z position of the GameActor.

Parameters
floatThe new z position of the GameActor.
void GameActor::setZOrientation ( float  zOrientation)

Setter # Sets the z orientation of the GameActor.

Parameters
floatThe new z orientation of the GameActor.
virtual void GameActor::updateActor ( float  dt)
pure virtual

A pure virtual function for updating the GameActor.

Parameters
floatThe delta time.

Implemented in Helicopter, Rotor, TurretBarrel, Turret, and Projectile.

Member Data Documentation

unsigned int GameActor::actorID
protected

A the GameActor id

unsigned int GameActor::actorIDGenerator = 0
staticprotected

A static member variable for the GameActor id generation

std::shared_ptr<Ogre::SceneNode> GameActor::gameActorNode
protected

A pointer to the GameActor node.

Ogre::Vector3 GameActor::orientation
protected

The orientation of the GameActor.

Ogre::Vector3 GameActor::position
protected

The position of the GameActor.

Ogre::Real GameActor::scale
protected

The scale of the GameActor


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