diff options
Diffstat (limited to 'extern/bullet2/src/BulletSoftBody/btSoftRigidDynamicsWorld.h')
-rw-r--r-- | extern/bullet2/src/BulletSoftBody/btSoftRigidDynamicsWorld.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/extern/bullet2/src/BulletSoftBody/btSoftRigidDynamicsWorld.h b/extern/bullet2/src/BulletSoftBody/btSoftRigidDynamicsWorld.h index 14220ee7564..7d8d0cb7daa 100644 --- a/extern/bullet2/src/BulletSoftBody/btSoftRigidDynamicsWorld.h +++ b/extern/bullet2/src/BulletSoftBody/btSoftRigidDynamicsWorld.h @@ -21,6 +21,8 @@ subject to the following restrictions: typedef btAlignedObjectArray<btSoftBody*> btSoftBodyArray; +class btSoftBodySolver; + class btSoftRigidDynamicsWorld : public btDiscreteDynamicsWorld { @@ -30,6 +32,9 @@ class btSoftRigidDynamicsWorld : public btDiscreteDynamicsWorld bool m_drawFaceTree; bool m_drawClusterTree; btSoftBodyWorldInfo m_sbi; + ///Solver classes that encapsulate multiple soft bodies for solving + btSoftBodySolver *m_softBodySolver; + bool m_ownsSolver; protected: @@ -37,23 +42,25 @@ protected: virtual void internalSingleStepSimulation( btScalar timeStep); - void updateSoftBodies(); - - void solveSoftBodiesConstraints(); + void solveSoftBodiesConstraints( btScalar timeStep ); + void serializeSoftBodies(btSerializer* serializer); public: - btSoftRigidDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration); + btSoftRigidDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver, btCollisionConfiguration* collisionConfiguration, btSoftBodySolver *softBodySolver = 0 ); virtual ~btSoftRigidDynamicsWorld(); virtual void debugDrawWorld(); - void addSoftBody(btSoftBody* body); + void addSoftBody(btSoftBody* body,short int collisionFilterGroup=btBroadphaseProxy::DefaultFilter,short int collisionFilterMask=btBroadphaseProxy::AllFilter); void removeSoftBody(btSoftBody* body); + ///removeCollisionObject will first check if it is a rigid body, if so call removeRigidBody otherwise call btDiscreteDynamicsWorld::removeCollisionObject + virtual void removeCollisionObject(btCollisionObject* collisionObject); + int getDrawFlags() const { return(m_drawFlags); } void setDrawFlags(int f) { m_drawFlags=f; } @@ -77,6 +84,7 @@ public: return m_softBodies; } + virtual void rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback) const; /// rayTestSingle performs a raycast call and calls the resultCallback. It is used internally by rayTest. @@ -88,6 +96,8 @@ public: const btTransform& colObjWorldTransform, RayResultCallback& resultCallback); + virtual void serialize(btSerializer* serializer); + }; #endif //BT_SOFT_RIGID_DYNAMICS_WORLD_H |