16#ifndef BT_SOFT_BODY_SOLVERS_H
17#define BT_SOFT_BODY_SOLVERS_H
21class btSoftBodyTriangleData;
22class btSoftBodyLinkData;
23class btSoftBodyVertexData;
124 virtual void addCollisionObjectForSoftBody(
int clothIdentifier,
btCollisionObject *collisionObject ) = 0;
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btCollisionObject can be used to manage collision detection objects.
Class to manage movement of data from a solver to a given target.
virtual ~btSoftBodySolverOutput()
virtual void copySoftBodyToVertexBuffer(const btSoftBody *const softBody, btVertexBufferDescriptor *vertexBuffer)=0
Output current computed vertex data to the vertex buffers for all cloths in the solver.
virtual void processCollision(btSoftBody *, btSoftBody *)=0
Process a collision between two soft bodies.
virtual int getNumberOfVelocityIterations()
Get the number of velocity constraint solver iterations this solver uses.
virtual void predictMotion(btScalar solverdt)=0
Predict motion of soft bodies into next timestep.
virtual void setNumberOfVelocityIterations(int iterations)
Set the number of velocity constraint solver iterations this solver uses.
float getTimeScale()
Return the timescale that the simulation is using.
virtual void processCollision(btSoftBody *, const struct btCollisionObjectWrapper *)=0
Process a collision between one of the world's soft bodies and another collision object.
virtual void setNumberOfPositionIterations(int iterations)
Set the number of velocity constraint solver iterations this solver uses.
virtual int getNumberOfPositionIterations()
Get the number of velocity constraint solver iterations this solver uses.
virtual SolverTypes getSolverType() const =0
Return the type of the solver.
int m_numberOfPositionIterations
virtual bool checkInitialized()=0
Ensure that this solver is initialized.
int m_numberOfVelocityIterations
virtual void copyBackToSoftBodies(bool bMove=true)=0
Copy necessary data back to the original soft body source objects.
virtual ~btSoftBodySolver()
virtual void updateSoftBodies()=0
Perform necessary per-step updates of soft bodies such as recomputing normals and bounding boxes.
@ REDUCED_DEFORMABLE_SOLVER
virtual void solveConstraints(btScalar solverdt)=0
Solve constraints for a set of soft bodies.
virtual void optimize(btAlignedObjectArray< btSoftBody * > &softBodies, bool forceUpdate=false)=0
Optimize soft bodies in this solver.
The btSoftBody is an class to simulate cloth and volumetric soft bodies.