Changeset View
Changeset View
Standalone View
Standalone View
extern/bullet2/src/BulletSoftBody/btDefaultSoftBodySolver.h
| Show All 10 Lines | |||||
| 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. | ||||
| 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. | ||||
| 3. This notice may not be removed or altered from any source distribution. | 3. This notice may not be removed or altered from any source distribution. | ||||
| */ | */ | ||||
| #ifndef BT_SOFT_BODY_DEFAULT_SOLVER_H | #ifndef BT_SOFT_BODY_DEFAULT_SOLVER_H | ||||
| #define BT_SOFT_BODY_DEFAULT_SOLVER_H | #define BT_SOFT_BODY_DEFAULT_SOLVER_H | ||||
| #include "BulletSoftBody/btSoftBodySolvers.h" | #include "BulletSoftBody/btSoftBodySolvers.h" | ||||
| #include "btSoftBodySolverVertexBuffer.h" | #include "btSoftBodySolverVertexBuffer.h" | ||||
| struct btCollisionObjectWrapper; | struct btCollisionObjectWrapper; | ||||
| class btDefaultSoftBodySolver : public btSoftBodySolver | class btDefaultSoftBodySolver : public btSoftBodySolver | ||||
| { | { | ||||
| protected: | protected: | ||||
| /** Variable to define whether we need to update solver constants on the next iteration */ | /** Variable to define whether we need to update solver constants on the next iteration */ | ||||
| bool m_updateSolverConstants; | bool m_updateSolverConstants; | ||||
| btAlignedObjectArray< btSoftBody * > m_softBodySet; | btAlignedObjectArray<btSoftBody *> m_softBodySet; | ||||
| public: | public: | ||||
| btDefaultSoftBodySolver(); | btDefaultSoftBodySolver(); | ||||
| virtual ~btDefaultSoftBodySolver(); | virtual ~btDefaultSoftBodySolver(); | ||||
| virtual SolverTypes getSolverType() const | virtual SolverTypes getSolverType() const | ||||
| { | { | ||||
| return DEFAULT_SOLVER; | return DEFAULT_SOLVER; | ||||
| } | } | ||||
| virtual bool checkInitialized(); | virtual bool checkInitialized(); | ||||
| virtual void updateSoftBodies( ); | virtual void updateSoftBodies(); | ||||
| virtual void optimize( btAlignedObjectArray< btSoftBody * > &softBodies,bool forceUpdate=false ); | virtual void optimize(btAlignedObjectArray<btSoftBody *> &softBodies, bool forceUpdate = false); | ||||
| virtual void copyBackToSoftBodies(bool bMove = true); | virtual void copyBackToSoftBodies(bool bMove = true); | ||||
| virtual void solveConstraints( float solverdt ); | virtual void solveConstraints(btScalar solverdt); | ||||
| virtual void predictMotion( float solverdt ); | virtual void predictMotion(btScalar solverdt); | ||||
| virtual void copySoftBodyToVertexBuffer( const btSoftBody *const softBody, btVertexBufferDescriptor *vertexBuffer ); | virtual void copySoftBodyToVertexBuffer(const btSoftBody *const softBody, btVertexBufferDescriptor *vertexBuffer); | ||||
| virtual void processCollision( btSoftBody *, const btCollisionObjectWrapper* ); | virtual void processCollision(btSoftBody *, const btCollisionObjectWrapper *); | ||||
| virtual void processCollision( btSoftBody*, btSoftBody* ); | virtual void processCollision(btSoftBody *, btSoftBody *); | ||||
| }; | }; | ||||
| #endif // #ifndef BT_ACCELERATED_SOFT_BODY_CPU_SOLVER_H | #endif // #ifndef BT_ACCELERATED_SOFT_BODY_CPU_SOLVER_H | ||||