16#ifndef BT_DEFORMABLE_BODY_SOLVERS_H
17#define BT_DEFORMABLE_BODY_SOLVERS_H
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.
virtual void processCollision(btSoftBody *softBody, btSoftBody *otherSoftBody)
Process a collision between two soft bodies.
virtual void updateSoftBodies()
Perform necessary per-step updates of soft bodies such as recomputing normals and bounding boxes.
virtual void solveDeformableConstraints(btScalar solverdt)
void updateEnergy(btScalar scale)
virtual SolverTypes getSolverType() const
Return the type of the solver.
virtual bool checkInitialized()
Ensure that this solver is initialized.
virtual void setConstraints(const btContactSolverInfo &infoGlobal)
virtual void processCollision(btSoftBody *softBody, const btCollisionObjectWrapper *collisionObjectWrap)
virtual ~btDeformableBodySolver()
btDeformableBackwardEulerObjective * m_objective
virtual void applyTransforms(btScalar timeStep)
virtual void setStrainLimiting(bool opt)
virtual void setPreconditioner(int opt)
virtual void setProjection()
int m_maxNewtonIterations
btScalar computeDescentStep(TVStack &ddv, const TVStack &residual, bool verbose=false)
virtual void copyBackToSoftBodies(bool bMove=true)
Copy necessary data back to the original soft body source objects.
virtual void copySoftBodyToVertexBuffer(const btSoftBody *const softBody, btVertexBufferDescriptor *vertexBuffer)
void predictDeformableMotion(btSoftBody *psb, btScalar dt)
virtual void optimize(btAlignedObjectArray< btSoftBody * > &softBodies, bool forceUpdate=false)
Optimize soft bodies in this solver.
btConjugateResidual< btDeformableBackwardEulerObjective > m_cr
btConjugateGradient< btDeformableBackwardEulerObjective > m_cg
virtual btAlignedObjectArray< btDeformableLagrangianForce * > * getLagrangianForceArray()
virtual void reinitialize(const btAlignedObjectArray< btSoftBody * > &softBodies, btScalar dt)
virtual void setupDeformableSolve(bool implicit)
void setLineSearch(bool lineSearch)
virtual const btAlignedObjectArray< btSoftBody::Node * > * getIndices()
btAlignedObjectArray< btSoftBody * > m_softBodies
virtual bool isReducedSolver()
virtual btScalar solveContactConstraints(btCollisionObject **deformableBodies, int numDeformableBodies, const btContactSolverInfo &infoGlobal)
virtual void solveConstraints(btScalar dt)
Solve constraints for a set of soft bodies.
btAlignedObjectArray< btVector3 > TVStack
btScalar m_newtonTolerance
virtual void predictMotion(btScalar solverdt)
Predict motion of soft bodies into next timestep.
void setImplicit(bool implicit)
void computeStep(TVStack &ddv, const TVStack &residual)
virtual void setLagrangeMultiplier()
void updateTempPosition()
virtual void applyExplicitForce()
virtual void setGravity(const btVector3 &gravity)
virtual void deformableBodyInternalWriteBack()
void updateDv(btScalar scale=1)
The btSoftBody is an class to simulate cloth and volumetric soft bodies.
void defaultCollisionHandler(const btCollisionObjectWrapper *pcoWrap)
btVector3 can be used to represent 3D points and vectors.