GameEngine::PhysicsManager Class Reference

#include <PhysicsManager.h>

Inheritance diagram for GameEngine::PhysicsManager:

Inheritance graph
[legend]
Collaboration diagram for GameEngine::PhysicsManager:

Collaboration graph
[legend]
List of all members.

Detailed Description

The physics manager is responsible for handling the physical simulation of game objects.

Definition at line 36 of file PhysicsManager.h.

Public Member Functions

 PhysicsManager (const Real &worldWidth, const Real &worldHeight, const Real &worldDepth, const Vector3 &gravity)
 ~PhysicsManager ()
void update (const double &dt)
virtual void OPAL_CALL handleMovementEvent (const opal::MovementEvent &event)
virtual void OPAL_CALL handleCollisionEvent (const opal::CollisionEvent &event)

Public Attributes

opal::Simulator * mPhysicsSim

Private Member Functions

Vector3wrapCoords (Vector3 &coords) const

Private Attributes

Real mWidth
Real mHeight
Real mDepth


Constructor & Destructor Documentation

GameEngine::PhysicsManager::PhysicsManager ( const Real worldWidth,
const Real worldHeight,
const Real worldDepth,
const Vector3 gravity 
)

Constructor

Parameters:
worldWidth The width of the world
worldHeight The height of the world
worldDepth The depth of the world
gravity Vector representing the gravity of the world

Definition at line 29 of file PhysicsManager.cpp.

GameEngine::PhysicsManager::~PhysicsManager (  ) 

Definition at line 41 of file PhysicsManager.cpp.


Member Function Documentation

void GameEngine::PhysicsManager::update ( const double &  dt  )  [virtual]

Update the physics world

Parameters:
dt Time since last frame was rendered

Reimplemented from GameEngine::Process.

Definition at line 48 of file PhysicsManager.cpp.

void OPAL_CALL GameEngine::PhysicsManager::handleMovementEvent ( const opal::MovementEvent &  event  )  [virtual]

Handles opal movements events, creates our own game engine event and queues it with the event manager

Parameters:
event The momvement event to handle

Definition at line 58 of file PhysicsManager.cpp.

void OPAL_CALL GameEngine::PhysicsManager::handleCollisionEvent ( const opal::CollisionEvent &  event  )  [virtual]

Handles opal collisions events, creates our own game engine event and queues it with the event manager

Parameters:
event The collision event to handle

Definition at line 74 of file PhysicsManager.cpp.

Vector3 & GameEngine::PhysicsManager::wrapCoords ( Vector3 coords  )  const [private]

Wrap a vector representing a set of coordinates to keep them withing the boundary of the world.

Parameters:
coords The coordinates to wrap
Returns:
The wrapped coordinates

Definition at line 84 of file PhysicsManager.cpp.


Member Data Documentation

opal::Simulator* GameEngine::PhysicsManager::mPhysicsSim

Definition at line 71 of file PhysicsManager.h.

Real GameEngine::PhysicsManager::mWidth [private]

Definition at line 82 of file PhysicsManager.h.

Real GameEngine::PhysicsManager::mHeight [private]

Definition at line 83 of file PhysicsManager.h.

Real GameEngine::PhysicsManager::mDepth [private]

Definition at line 84 of file PhysicsManager.h.


The documentation for this class was generated from the following files:
Generated on Thu Apr 19 09:49:03 2007 for GameEngine by  doxygen 1.5.2