Jamie Slowgrove - OOT Assignment 1 - A Mission in Afghanistan
 All Classes Namespaces Files Functions Variables Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Turret Class Reference

A class for a Turret object that inherits GameActor. More...

#include <Turret.h>

Inheritance diagram for Turret:
Inheritance graph
Collaboration diagram for Turret:
Collaboration graph

Public Member Functions

 Turret (Ogre::Vector3 position, Ogre::Vector3 orientation, Ogre::Real scale)
 
 ~Turret ()
 
void setTarget (Ogre::Vector3 target)
 
void setUpActor (OgreApplication *application)
 
void updateActor (float dt)
 
void updateProjectiles (float dt, OgreApplication *application, std::shared_ptr< Helicopter > helicopter)
 
- Public Member Functions inherited from GameActor
 GameActor (Ogre::Vector3 position, Ogre::Vector3 orientation, Ogre::Real scale)
 
virtual ~GameActor ()
 
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)
 

Private Member Functions

void rotateTurret ()
 

Private Attributes

std::shared_ptr< TurretBarrelbarrel
 
Ogre::Vector3 target
 
Ogre::Vector3 lastTarget
 

Additional Inherited Members

- Protected Attributes inherited from GameActor
std::shared_ptr< Ogre::SceneNode > gameActorNode
 
Ogre::Vector3 position
 
Ogre::Vector3 orientation
 
Ogre::Real scale
 
unsigned int actorID
 
- Static Protected Attributes inherited from GameActor
static unsigned int actorIDGenerator = 0
 

Detailed Description

A class for a Turret object that inherits GameActor.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

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

Constructs the Turret object.

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

Destructs the Turret object.

Member Function Documentation

void Turret::rotateTurret ( )
private

Rotates the Turret.

Here is the call graph for this function:

Here is the caller graph for this function:

void Turret::setTarget ( Ogre::Vector3  target)

Setter # Sets the target of the Turret.

Parameters
Ogre::Vector3The new target of the Turret.
void Turret::setUpActor ( OgreApplication application)
virtual

Sets up the actor for the Turret.

Parameters
OgreApplicationA pointer to the application.

Implements GameActor.

Here is the call graph for this function:

void Turret::updateActor ( float  dt)
virtual

Updates the Turret actor.

Parameters
floatThe delta time.

Implements GameActor.

Here is the call graph for this function:

void Turret::updateProjectiles ( float  dt,
OgreApplication application,
std::shared_ptr< Helicopter helicopter 
)

Updates the Projectiles.

Parameters
floatThe delta time.
OgreApplication* A pointer to the application.

Member Data Documentation

std::shared_ptr<TurretBarrel> Turret::barrel
private

A pointer to the TurretBarrel

Ogre::Vector3 Turret::lastTarget
private

The last target vector of the Projectile

Ogre::Vector3 Turret::target
private

The target vector of the Projectile


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