#include <pal.h>
Public Member Functions | |
virtual void | Init (palPhysicsDesc &desc) |
virtual void | Update (Float timestep) |
virtual void | Cleanup ()=0 |
virtual const char * | GetPALVersion ()=0 |
virtual const char * | GetVersion ()=0 |
virtual Float | GetTime () |
virtual Float | GetLastTimestep () |
virtual void | SetGroupCollision (palGroup a, palGroup b, bool enabled) |
virtual void | GetGravity (palVector3 &g) |
unsigned int | GetUpAxis () const |
Return the index, i.e. x (0), y (1), or z(2), to use for up. | |
Protected Attributes | |
bool | m_bListen |
If set to true, notify functions are called. | |
Float | m_fGravityX |
The gravity vector (x). | |
Float | m_fGravityY |
The gravity vector (y). | |
Float | m_fGravityZ |
The gravity vector (z). |
NOTE: The current version of PAL does not allow multiple instances of physics, for the same underlying physics engine.- 27/07/04
virtual void palPhysics::Cleanup | ( | ) | [pure virtual] |
This removes all objects and frees all memory used by the physics engine. Any further uses of existing phyiscics object references will have an undefined effect.
void palPhysics::GetGravity | ( | palVector3 & | g | ) | [virtual] |
Returns the current direction of gravity.
Float palPhysics::GetLastTimestep | ( | ) | [virtual] |
Returns the last timestep
virtual const char* palPhysics::GetPALVersion | ( | ) | [pure virtual] |
This returns the PAL version information.
Float palPhysics::GetTime | ( | ) | [virtual] |
Returns the current simulation time
virtual const char* palPhysics::GetVersion | ( | ) | [pure virtual] |
This returns the physics engine name and physics engine version.
void palPhysics::Init | ( | palPhysicsDesc & | desc | ) | [virtual] |
Initializes the physics engine.
desc | The description object defining the settings for this physics instance. |
void palPhysics::SetGroupCollision | ( | palGroup | a, | |
palGroup | b, | |||
bool | enabled | |||
) | [virtual] |
Sets the interactions between collision groups to enabled/disabled
void palPhysics::Update | ( | Float | timestep | ) | [virtual] |
This advances the physics simulation by the specified ammount of time. The best usage of this parameter is determined by the physics engine implementation. Consult the implementation documentation, or the physics engine documentation. The safest method is to treat the timestep as a constant.
timestep | The increment in time since the last update |