A class for the GamePhysics.
More...
#include <GamePhysics.h>
|
| 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) |
|
A class for the GamePhysics.
- Author
- Jamie Slowgrove
GamePhysics::GamePhysics |
( |
| ) |
|
GamePhysics::~GamePhysics |
( |
| ) |
|
bool GamePhysics::collisionTest |
( |
Ogre::Vector3 |
position, |
|
|
Ogre::Vector3 |
testPosition |
|
) |
| |
Test if there is a collision.
- Parameters
-
Ogre::Vector3 | The position. |
Ogre::Vector3 | The test position. |
Ogre::Vector3 GamePhysics::getProjectileDisplacement |
( |
| ) |
|
Getter # Gets the displacement of the Helicopter.
- Returns
- Ogre::Vector3 The displacement of the Helicopter.
Ogre::Real GamePhysics::getSfromUAT |
( |
Ogre::Real |
u, |
|
|
Ogre::Real |
a, |
|
|
Ogre::Real |
t |
|
) |
| |
SUVAT equation s=ut+(1/2)a(t^2). Works out the displacement from the initial velocity, the acceleration and the time.
- Parameters
-
Ogre::Real | The initial velocity. |
Ogre::Real | The acceleration. |
Ogre::Real | The time. |
- Returns
- Ogre::Real The displacement.
Ogre::Real GamePhysics::getSfromUVT |
( |
Ogre::Real |
u, |
|
|
Ogre::Real |
v, |
|
|
Ogre::Real |
t |
|
) |
| |
SUVAT equation s=(1/2)(u+v)t. Works out the displacement from the initial velocity, the displacement and the time.
- Parameters
-
Ogre::Real | The initial velocity. |
Ogre::Real | The displacement. |
Ogre::Real | The time. |
- Returns
- Ogre::Real The displacement.
Ogre::Real GamePhysics::getSfromVAT |
( |
Ogre::Real |
v, |
|
|
Ogre::Real |
a, |
|
|
Ogre::Real |
t |
|
) |
| |
SUVAT equation s=vt-(1/2)a(t^2). Works out the displacement from the velocity, the acceleration and the time.
- Parameters
-
Ogre::Real | The velocity. |
Ogre::Real | The acceleration. |
Ogre::Real | The time. |
- Returns
- Ogre::Real The displacement.
Ogre::Real GamePhysics::getVfromUAT |
( |
Ogre::Real |
u, |
|
|
Ogre::Real |
a, |
|
|
Ogre::Real |
t |
|
) |
| |
SUVAT equation v=u+at. Works out the velocity from the initial velocity, the acceleration and the time.
- Parameters
-
Ogre::Real | The initial velocity. |
Ogre::Real | The acceleration. |
Ogre::Real | The time. |
- Returns
- Ogre::Real The velocity.
Ogre::Real GamePhysics::getVSquaredfromUAS |
( |
Ogre::Real |
u, |
|
|
Ogre::Real |
a, |
|
|
Ogre::Real |
s |
|
) |
| |
SUVAT equation v^2=u^2+2as. Works out the velocity squared from the initial velocity, the acceleration and the displacement.
- Parameters
-
Ogre::Real | The initial velocity. |
Ogre::Real | The acceleration. |
Ogre::Real | The displacement. |
- Returns
- Ogre::Real The velocity squared.
void GamePhysics::updateProjectile |
( |
float |
dt | ) |
|
Updates the projectile.
- Parameters
-
The documentation for this class was generated from the following files: