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

A class for a Projectile object that inherits GameActor and GamePhysics. More...

#include <Projectile.h>

Inheritance diagram for Projectile:
Inheritance graph
Collaboration diagram for Projectile:
Collaboration graph

Public Member Functions

 Projectile (Ogre::Vector3 position, Ogre::Vector3 orientation, Ogre::Real scale, std::shared_ptr< Ogre::SceneNode > parentNode, Ogre::Vector3 initalVelocity)
 
 ~Projectile ()
 
Ogre::Vector3 getWorldPosition ()
 
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)
 
- Public Member Functions inherited from GamePhysics
 GamePhysics ()
 
 ~GamePhysics ()
 
void updateProjectile (float dt)
 
Ogre::Vector3 getProjectileDisplacement ()
 
Ogre::Real getVfromUAT (Ogre::Real u, Ogre::Real a, Ogre::Real t)
 
Ogre::Real getSfromUAT (Ogre::Real u, Ogre::Real a, Ogre::Real t)
 
Ogre::Real getSfromUVT (Ogre::Real u, Ogre::Real v, Ogre::Real t)
 
Ogre::Real getVSquaredfromUAS (Ogre::Real u, Ogre::Real a, Ogre::Real s)
 
Ogre::Real getSfromVAT (Ogre::Real v, Ogre::Real a, Ogre::Real t)
 
bool collisionTest (Ogre::Vector3 position, Ogre::Vector3 testPosition)
 

Private Attributes

std::shared_ptr< Ogre::SceneNode > parentNode
 

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
 
- Protected Attributes inherited from GamePhysics
std::shared_ptr< ProjectileObjectprojectile
 
- Static Protected Attributes inherited from GameActor
static unsigned int actorIDGenerator = 0
 

Detailed Description

A class for a Projectile object that inherits GameActor and GamePhysics.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

Projectile::Projectile ( Ogre::Vector3  position,
Ogre::Vector3  orientation,
Ogre::Real  scale,
std::shared_ptr< Ogre::SceneNode >  parentNode,
Ogre::Vector3  initalVelocity 
)

Constructs the Projectile object.

Parameters
Ogre::Vector3The position of the Projectile.
Ogre::Vector3The orientation of the Projectile.
Ogre::RealThe scale of the Projectile.
std::shared_ptr<Ogre::SceneNode>A shared pointer to the parent node.
Ogre::Vector3The inital velocity of the Projectile.
Projectile::~Projectile ( )

Destructs the Projectile object.

Member Function Documentation

Ogre::Vector3 Projectile::getWorldPosition ( )

Getter # Gets the world position of the Projectile.

Returns
Ogre::Vector3 The world position of the Projectile.
void Projectile::setUpActor ( OgreApplication application)
virtual

Sets up the actor for the Projectile.

Parameters
OgreApplicationA pointer to the application.

Implements GameActor.

Here is the call graph for this function:

void Projectile::updateActor ( float  dt)
virtual

Updates the Projectile actor.

Parameters
floatThe delta time.

Implements GameActor.

Here is the call graph for this function:

Member Data Documentation

std::shared_ptr<Ogre::SceneNode> Projectile::parentNode
private

The parent node of the projectile


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