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
Rotor Class Reference

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

#include <Rotor.h>

Inheritance diagram for Rotor:
Inheritance graph
Collaboration diagram for Rotor:
Collaboration graph

Public Member Functions

 Rotor (Ogre::Vector3 position, Ogre::Vector3 orientation, Ogre::Real scale, std::shared_ptr< Ogre::SceneNode > helicopterNode, Ogre::String rotorType)
 
 ~Rotor ()
 
void updateRotateSpeed ()
 
void setTargetRotateSpeedPercent (Ogre::Real targetRotateSpeedPercent)
 
void setRotateAxis (Ogre::Vector3 rotationAxis)
 
void setUpActor (OgreApplication *application)
 
void updateActor (float dt)
 
- 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 rotateRotor (float dt)
 

Private Attributes

std::shared_ptr< Ogre::SceneNode > helicopterNode
 
Ogre::Real rotateSpeed
 
Ogre::String rotorType
 
Ogre::Vector3 rotationAxis
 
Ogre::Real maxRotorSpeed
 
Ogre::Real targetRotateSpeedPercent
 

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 Rotor object that inherits GameActor.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

Rotor::Rotor ( Ogre::Vector3  position,
Ogre::Vector3  orientation,
Ogre::Real  scale,
std::shared_ptr< Ogre::SceneNode >  helicopterNode,
Ogre::String  rotorType 
)

Constructs the Rotor object.

Parameters
Ogre::Vector3The position of the Rotor.
Ogre::Vector3The orientation of the Rotor.
Ogre::RealThe scale of the Rotor.
std::shared_ptr<Ogre::SceneNode>A shared pointer to the Helicopter node.
Ogre::StringThe type of the Rotor (aftRotor or topRotor).
Rotor::~Rotor ( )

Destructs the Rotor object.

Member Function Documentation

void Rotor::rotateRotor ( float  dt)
private

Rotates the Rotor.

Parameters
floatThe delta time.

Here is the call graph for this function:

Here is the caller graph for this function:

void Rotor::setRotateAxis ( Ogre::Vector3  rotationAxis)

Setter # Sets the rotation axis of the rotor.

Parameters
Ogre::Vector3The rotation axis of the Rotor. E.g. to rotate on the x rotation axis will be (1.0f,0.0f,0.0f)..
void Rotor::setTargetRotateSpeedPercent ( Ogre::Real  targetRotateSpeedPercent)

Setter # Sets the target percent of the rotation speed of the rotor.

Parameters
Ogre::RealThe new target percentage rotation speed of the rotor.
void Rotor::setUpActor ( OgreApplication application)
virtual

Sets up the actor for the Rotor.

Parameters
OgreApplicationA pointer to the application.

Implements GameActor.

Here is the call graph for this function:

void Rotor::updateActor ( float  dt)
virtual

Updates the Rotor actor.

Parameters
floatThe delta time.

Implements GameActor.

Here is the call graph for this function:

void Rotor::updateRotateSpeed ( )

Updates the rotation speed of the rotor.

Member Data Documentation

std::shared_ptr<Ogre::SceneNode> Rotor::helicopterNode
private

A pointer to the Helicopter node.

Ogre::Real Rotor::maxRotorSpeed
private

The max speed that the Rotor will rotate

Ogre::Real Rotor::rotateSpeed
private

The speed of the Rotor rotation.

Ogre::Vector3 Rotor::rotationAxis
private

The rotation axis of the Rotor. E.g. to rotate on the x rotation axis will be (1.0f,0.0f,0.0f).

Ogre::String Rotor::rotorType
private

The type of Rotor

Ogre::Real Rotor::targetRotateSpeedPercent
private

The percentage speed of the max speed that the Rotor will target


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