palPhysics Class Reference

#include <pal.h>

List of all members.

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).


Detailed Description

The main physics class. This class controls the underlying physics engine.

NOTE: The current version of PAL does not allow multiple instances of physics, for the same underlying physics engine.- 27/07/04


Member Function Documentation

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.

Parameters:
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.

Parameters:
timestep The increment in time since the last update


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

Generated on Mon Aug 31 13:58:02 2009 for pal by  doxygen 1.5.7.1