diff options
Diffstat (limited to 'extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h')
-rw-r--r-- | extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h index 23a38dd2a12..fa934c49d2b 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h @@ -25,7 +25,7 @@ class btConstraintSolver; class btSimulationIslandManager; class btTypedConstraint; class btActionInterface; - +class btPersistentManifold; class btIDebugDraw; struct InplaceSolverIslandCallback; @@ -34,7 +34,7 @@ struct InplaceSolverIslandCallback; ///btDiscreteDynamicsWorld provides discrete rigid body simulation ///those classes replace the obsolete CcdPhysicsEnvironment/CcdPhysicsController -class btDiscreteDynamicsWorld : public btDynamicsWorld +ATTRIBUTE_ALIGNED16(class) btDiscreteDynamicsWorld : public btDynamicsWorld { protected: @@ -58,11 +58,14 @@ protected: bool m_ownsIslandManager; bool m_ownsConstraintSolver; bool m_synchronizeAllMotionStates; + bool m_applySpeculativeContactRestitution; btAlignedObjectArray<btActionInterface*> m_actions; int m_profileTimings; + btAlignedObjectArray<btPersistentManifold*> m_predictiveManifolds; + virtual void predictUnconstraintMotion(btScalar timeStep); virtual void integrateTransforms(btScalar timeStep); @@ -79,14 +82,19 @@ protected: virtual void internalSingleStepSimulation( btScalar timeStep); + void createPredictiveContacts(btScalar timeStep); virtual void saveKinematicState(btScalar timeStep); void serializeRigidBodies(btSerializer* serializer); + void serializeDynamicsWorldInfo(btSerializer* serializer); + public: + BT_DECLARE_ALIGNED_ALLOCATOR(); + ///this btDiscreteDynamicsWorld constructor gets created objects from the user, and will not delete those btDiscreteDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration); @@ -195,6 +203,16 @@ public: return m_synchronizeAllMotionStates; } + void setApplySpeculativeContactRestitution(bool enable) + { + m_applySpeculativeContactRestitution = enable; + } + + bool getApplySpeculativeContactRestitution() const + { + return m_applySpeculativeContactRestitution; + } + ///Preliminary serialization test for Bullet 2.76. Loading those files requires a separate parser (see Bullet/Demos/SerializeDemo) virtual void serialize(btSerializer* serializer); |