|
Jamie Slowgrove - OOT Assignment 1 - A Mission in Afghanistan
|
A class for a Helicopter object that inherits GameActor. More...
#include <Helicopter.h>


Public Member Functions | |
| Helicopter (Ogre::Vector3 position, Ogre::Vector3 orientation, Ogre::Real scale) | |
| ~Helicopter () | |
| void | takeDamage () |
| void | resetHelicopter () |
| int | getHealth () |
| Ogre::Vector3 | getSpeed () |
| void | setSpeed (Ogre::Vector3 speed) |
| void | setXSpeed (float xSpeed) |
| void | setYSpeed (float ySpeed) |
| void | setZSpeed (float zSpeed) |
| Ogre::Vector3 | getLastRotation () |
| void | setUpActor (OgreApplication *application) |
| void | handleInput (OIS::Keyboard *keyboard, OIS::Mouse *mouse) |
| 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 | updateSpeed () |
| void | rotateHelicopter () |
| void | updateMoveSpeed () |
Private Attributes | |
| std::shared_ptr< Rotor > | mainRotor |
| std::shared_ptr< Rotor > | sideRotor |
| Ogre::Vector3 | spawn |
| Ogre::Vector3 | direction |
| Ogre::Vector3 | speed |
| Ogre::Real | maxSpeed |
| Ogre::Vector3 | targetSpeedPercent |
| bool | up |
| bool | down |
| bool | left |
| bool | right |
| bool | forwards |
| bool | backwards |
| int | mouseX |
| int | mouseY |
| int | health |
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 |
A class for a Helicopter object that inherits GameActor.
| Helicopter::Helicopter | ( | Ogre::Vector3 | position, |
| Ogre::Vector3 | orientation, | ||
| Ogre::Real | scale | ||
| ) |
Constructs the Helicopter object.
| Ogre::Vector3 | The position of the Helicopter. |
| Ogre::Vector3 | The orientation of the Helicopter. |
| Ogre::Real | The scale of the Helicopter. |
| Helicopter::~Helicopter | ( | ) |
Destructs the Helicopter object.
| int Helicopter::getHealth | ( | ) |
Getter # Gets the health of the Helicopter.
| Ogre::Vector3 Helicopter::getLastRotation | ( | ) |
Getter # Gets the last rotation of the Helicopter.
| Ogre::Vector3 Helicopter::getSpeed | ( | ) |
Getter # Gets the speed of the Helicopter.
| void Helicopter::handleInput | ( | OIS::Keyboard * | keyboard, |
| OIS::Mouse * | mouse | ||
| ) |
Handles the user input.
| OIS::Keyboard* | A pointer to the keyboard. |
| void Helicopter::resetHelicopter | ( | ) |
|
private |
Rotates the helicopter using the user commands.

| void Helicopter::setSpeed | ( | Ogre::Vector3 | speed | ) |
Setter # Sets the speed of the Helicopter.
| Ogre::Vector3 | The new speed of the Helicopter. |
|
virtual |
Sets up the actor for the Helicopter.
| OgreApplication | A pointer to the application. |
Implements GameActor.

| void Helicopter::setXSpeed | ( | float | xSpeed | ) |
Setter # Sets the x speed of the Helicopter.
| float | The new x speed of the Helicopter. |
| void Helicopter::setYSpeed | ( | float | ySpeed | ) |
Setter # Sets the y speed of the Helicopter.
| float | The new y speed of the Helicopter. |
| void Helicopter::setZSpeed | ( | float | zSpeed | ) |
Setter # Sets the z speed of the Helicopter.
| float | The new z speed of the Helicopter. |
| void Helicopter::takeDamage | ( | ) |
Decrease the health of the Helicopter by 1.
|
virtual |
Updates the Helicopter actor.
| float | The delta time. |
Implements GameActor.

|
private |
|
private |
Updates the speeds of the helicopter using the user commands.

|
private |
A bool for if the Helicopter should move backwards
|
private |
The initial direction of the Helicopter.
|
private |
A bool for if the Helicopter should move down
|
private |
A bool for if the Helicopter should move forwards
|
private |
The health of the helicopter
|
private |
A bool for if the Helicopter should move left
|
private |
A pointer to the main rotor of the Helicopter.
|
private |
The max speed of the Helicopter.
|
private |
The x mouse position
|
private |
The y mouse position
|
private |
A bool for if the Helicopter should move right
|
private |
A pointer to the side rotor of the Helicopter.
|
private |
The spawn of the Helicopter.
|
private |
The speed of the Helicopter.
|
private |
The percentage speed of the max speed that the Helicopter will target
|
private |
A bool for if the Helicopter should move up
1.8.8