Jamie Slowgrove - OOT Assignment 1 - A Mission in Afghanistan
|
A class for a Turret object that inherits GameActor. More...
#include <Turret.h>
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< TurretBarrel > | barrel |
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 |
Turret::Turret | ( | Ogre::Vector3 | position, |
Ogre::Vector3 | orientation, | ||
Ogre::Real | scale | ||
) |
Turret::~Turret | ( | ) |
Destructs the Turret object.
|
private |
Rotates the Turret.
void Turret::setTarget | ( | Ogre::Vector3 | target | ) |
|
virtual |
Sets up the actor for the Turret.
OgreApplication | A pointer to the application. |
Implements GameActor.
|
virtual |
void Turret::updateProjectiles | ( | float | dt, |
OgreApplication * | application, | ||
std::shared_ptr< Helicopter > | helicopter | ||
) |
Updates the Projectiles.
float | The delta time. |
OgreApplication | * A pointer to the application. |
|
private |
A pointer to the TurretBarrel
|
private |
The last target vector of the Projectile
|
private |
The target vector of the Projectile