3 #include "btBulletDynamicsCommon.h" 4 #include "IParaPhysics.h" 5 #include "PhysicsDebugDraw.h" 10 #define CONVERT_BTVECTOR3(x) *((btVector3*)&(x)) 12 #define CONVERT_PARAVECTOR3(x) *((PARAVECTOR3*)&(x)) 30 virtual void SetUserData(
void* pData) {
m_pUserData = pData;};
33 virtual void Release();
37 btTriangleIndexVertexArray* m_indexVertexArrays;
38 int32* m_triangleIndices;
51 virtual void SetUserData(
void* pData) {
m_pUserData = pData;};
52 virtual void*
get() {
return m_pActor;};
53 virtual void Release();
66 typedef std::set<BulletPhysicsActor*> BulletPhysicsActor_Map_Type;
67 typedef std::set<BulletPhysicsShape*> BulletPhysicsShape_Array_Type;
72 virtual bool InitPhysics();
77 virtual bool StepSimulation(
float fDeltaTime);
81 virtual bool ExitPhysics();
85 virtual void Release();
115 virtual void DebugDrawWorld();
118 virtual void SetDebugDrawMode(
int debugMode);
121 virtual int GetDebugDrawMode();
126 return m_dynamicsWorld;
130 btBroadphaseInterface* m_broadphase;
131 btCollisionDispatcher* m_dispatcher;
132 btConstraintSolver* m_solver;
133 btDefaultCollisionConfiguration* m_collisionConfiguration;
135 btDiscreteDynamicsWorld* m_dynamicsWorld;
136 btCollisionWorld* m_collisionWorld;
142 BulletPhysicsActor_Map_Type m_actors;
145 bool m_bInvertFaceWinding;
BulletPhysicsShape_Array_Type m_collisionShapes
keep the collision shapes, for deletion/cleanup
Definition: ParaPhysicsWorld.h:139
Definition: PEtypes.h:327
different physics engine has different winding order.
Definition: EventBinding.h:32
virtual btDynamicsWorld * GetScene()
get a pointer to physics scene object
Definition: ParaPhysicsWorld.h:124
Definition: ParaPhysicsWorld.h:63
Create descriptor for triangle mesh shape.
Definition: IParaPhysics.h:30
it is represent a shape that can be used to create various actors in the scene.
Definition: IParaPhysics.h:42
virtual void * GetUserData()
get user data associated with the shape
Definition: ParaPhysicsWorld.h:50
virtual void * GetUserData()
get user data associated with the shape
Definition: ParaPhysicsWorld.h:29
void * m_pUserData
keep some user data here
Definition: ParaPhysicsWorld.h:42
IParaDebugDraw draw interface draws line based primitives for debugging purposes. ...
Definition: IParaDebugDraw.h:10
Definition: PhysicsDebugDraw.h:11
Definition: IParaPhysics.h:91
ParaPhysics core interface.
Definition: IParaPhysics.h:100
it is represent a shape that can be used to create various actors in the scene.
Definition: IParaPhysics.h:79
it is represent a shape that can be used to create various actors in the scene.
Definition: ParaPhysicsWorld.h:46
void * m_pUserData
keep some user data here
Definition: ParaPhysicsWorld.h:58
Definition: PEtypes.h:298
btRigidBody * m_pActor
pointer to the low level physics engine actor(rigid body).
Definition: ParaPhysicsWorld.h:56
it is represent a shape that can be used to create various actors in the scene.
Definition: ParaPhysicsWorld.h:24
btCollisionShape * m_pShape
pointer to the low level physics engine shape object.
Definition: ParaPhysicsWorld.h:36
Create descriptor for a physics actor.
Definition: IParaPhysics.h:56