My Project
Public Types | Public Member Functions | Protected Attributes | List of all members
ParaEngine::CParaPhysicsWorld Class Reference
Inheritance diagram for ParaEngine::CParaPhysicsWorld:
ParaEngine::IParaPhysics

Public Types

typedef std::set< BulletPhysicsActor * > BulletPhysicsActor_Map_Type
 
typedef std::set< BulletPhysicsShape * > BulletPhysicsShape_Array_Type
 

Public Member Functions

virtual bool InitPhysics ()
 create and initialize all physics lib and create the default scene(world)
 
virtual bool StepSimulation (float fDeltaTime)
 step simulation More...
 
virtual bool ExitPhysics ()
 cleanup all physics entities.
 
virtual void Release ()
 all this to unload the IPhysics. More...
 
virtual IParaPhysicsShapeCreateTriangleMeshShap (const ParaPhysicsTriangleMeshDesc &meshDesc)
 create a triangle shape. More...
 
virtual void ReleaseShape (IParaPhysicsShape *pShape)
 release a physics shape
 
virtual IParaPhysicsActorCreateActor (const ParaPhysicsActorDesc &meshDesc)
 create an physics actor(rigid body) in the current world. More...
 
virtual void ReleaseActor (IParaPhysicsActor *pActor)
 release a physics actor. More...
 
virtual IParaPhysicsActorRaycastClosestShape (const PARAVECTOR3 &vOrigin, const PARAVECTOR3 &vDirection, DWORD dwType, RayCastHitResult &hit, short dwGroupMask, float fSensorRange)
 ray cast a given group. More...
 
virtual void SetDebugDrawer (IParaDebugDraw *debugDrawer)
 set the debug draw object for debugging physics world. More...
 
virtual IParaDebugDrawGetDebugDrawer ()
 Get the debug draw object for debugging physics world. More...
 
virtual void DebugDrawObject (const PARAVECTOR3 &vOrigin, const PARAMATRIX3x3 &vRotation, const IParaPhysicsShape *pShape, const PARAVECTOR3 &color)
 draw a given object. More...
 
virtual void DebugDrawWorld ()
 draw the entire physics debug world. More...
 
virtual void SetDebugDrawMode (int debugMode)
 bitwise of PhysicsDebugDrawModes
 
virtual int GetDebugDrawMode ()
 bitwise of PhysicsDebugDrawModes
 
virtual btDynamicsWorld * GetScene ()
 get a pointer to physics scene object
 

Protected Attributes

btBroadphaseInterface * m_broadphase
 
btCollisionDispatcher * m_dispatcher
 
btConstraintSolver * m_solver
 
btDefaultCollisionConfiguration * m_collisionConfiguration
 
btDiscreteDynamicsWorld * m_dynamicsWorld
 
btCollisionWorld * m_collisionWorld
 
BulletPhysicsShape_Array_Type m_collisionShapes
 keep the collision shapes, for deletion/cleanup
 
BulletPhysicsActor_Map_Type m_actors
 
CPhysicsDebugDraw m_physics_debug_draw
 
bool m_bInvertFaceWinding
 

Member Function Documentation

§ CreateActor()

IParaPhysicsActor * CParaPhysicsWorld::CreateActor ( const ParaPhysicsActorDesc meshDesc)
virtual

create an physics actor(rigid body) in the current world.

Implements ParaEngine::IParaPhysics.

§ CreateTriangleMeshShap()

IParaPhysicsShape * CParaPhysicsWorld::CreateTriangleMeshShap ( const ParaPhysicsTriangleMeshDesc meshDesc)
virtual

create a triangle shape.

Returns
: the triangle shape pointer is returned.

Implements ParaEngine::IParaPhysics.

§ DebugDrawObject()

void ParaEngine::CParaPhysicsWorld::DebugDrawObject ( const PARAVECTOR3 vOrigin,
const PARAMATRIX3x3 vRotation,
const IParaPhysicsShape pShape,
const PARAVECTOR3 color 
)
virtual

draw a given object.

Implements ParaEngine::IParaPhysics.

§ DebugDrawWorld()

void ParaEngine::CParaPhysicsWorld::DebugDrawWorld ( )
virtual

draw the entire physics debug world.

Implements ParaEngine::IParaPhysics.

§ GetDebugDrawer()

IParaDebugDraw * ParaEngine::CParaPhysicsWorld::GetDebugDrawer ( )
virtual

Get the debug draw object for debugging physics world.

Implements ParaEngine::IParaPhysics.

§ RaycastClosestShape()

IParaPhysicsActor * ParaEngine::CParaPhysicsWorld::RaycastClosestShape ( const PARAVECTOR3 vOrigin,
const PARAVECTOR3 vDirection,
DWORD  dwType,
RayCastHitResult hit,
short  dwGroupMask,
float  fSensorRange 
)
virtual

ray cast a given group.

Implements ParaEngine::IParaPhysics.

§ Release()

void CParaPhysicsWorld::Release ( void  )
virtual

all this to unload the IPhysics.

Pointer to this class will be invalid after the call

Implements ParaEngine::IParaPhysics.

§ ReleaseActor()

void CParaPhysicsWorld::ReleaseActor ( IParaPhysicsActor pActor)
virtual

release a physics actor.

Implements ParaEngine::IParaPhysics.

§ SetDebugDrawer()

void ParaEngine::CParaPhysicsWorld::SetDebugDrawer ( IParaDebugDraw debugDrawer)
virtual

set the debug draw object for debugging physics world.

Implements ParaEngine::IParaPhysics.

§ StepSimulation()

bool CParaPhysicsWorld::StepSimulation ( float  fDeltaTime)
virtual

step simulation

Parameters
fDeltaTimein seconds.

Implements ParaEngine::IParaPhysics.


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