40 #ifndef _physicsphysicsmanager_h
41 #define _physicsphysicsmanager_h
45 class btDefaultCollisionConfiguration;
46 class btCollisionDispatcher;
47 class btSequentialImpulseConstraintSolver;
48 class btSoftRigidDynamicsWorld;
49 class btDiscreteDynamicsWorld;
50 class btDynamicsWorld;
51 class btCollisionShape;
52 class btSoftBodyRigidBodyCollisionConfiguration;
53 class btGhostPairCallback;
54 class btBroadphaseInterface;
55 class btCollisionConfiguration;
56 class btThreadSupportInterface;
58 typedef float btScalar;
64 #include "worldmanager.h"
65 #include "managerfactory.h"
66 #include "singleton.h"
67 #include "Physics/collidablepair.h"
68 #include "Physics/constraint.h"
69 #include "Physics/managerconstructioninfo.h"
79 class InternalDebugDrawer;
84 class CollisionDispatcher;
85 class ParallelCollisionDispatcher;
87 class CollidableProxy;
155 virtual void UseThreads(
const Whole& AmountToUse);
158 virtual Whole UsingThreadCount();
274 bool SimulationPaused;
276 Whole SubstepModifier;
288 btGhostPairCallback* GhostCallback;
289 btThreadSupportInterface* BulletSolverThreads;
290 btThreadSupportInterface* BulletDispatcherThreads;
291 btBroadphaseInterface* BulletBroadphase;
292 btCollisionConfiguration* BulletCollisionConfiguration;
293 btCollisionDispatcher* BulletDispatcher;
294 btSequentialImpulseConstraintSolver* BulletSolver;
295 btSoftRigidDynamicsWorld* BulletDynamicsWorld;
316 virtual void Destroy();
320 virtual void ProcessAllTriggers();
323 virtual void ProcessAllCollisions();
326 static void InternalTickCallback(btDynamicsWorld* world, btScalar timeStep);
349 void PauseSimulation(
bool Pause);
352 bool SimulationIsPaused();
360 void SetWorldGravity(
const Vector3& pgrav);
369 void SetWorldSoftGravity(
const Vector3& sgrav);
411 UInt32 GetNumProxies()
const;
416 void DestroyAllProxies();
432 Whole GetNumConstraints();
439 void DestroyAllConstraints();
458 Whole GetNumWorldTriggers();
464 void DestroyAllWorldTriggers();
475 Whole GetNumCollisions();
486 void DestroyAllCollisions();
508 void SetDebugRenderingMode(
const Integer DebugRenderingMode);
512 Integer GetDebugRenderingMode()
const;
524 void ClearPhysicsMetaData();
534 void SetSimulationSubstepModifier(
const Whole& Modifier);
537 virtual void Pause(
const UInt32 PL);
540 void MainLoopInitialize();
542 virtual void Initialize();
544 virtual void Deinitialize();
562 virtual String GetImplementationTypeName()
const;
569 btSoftRigidDynamicsWorld* _GetPhysicsWorldPointer();
572 const btSoftRigidDynamicsWorld* _GetPhysicsWorldPointer()
const;
589 String GetManagerTypeName()
const;