Bullet Collision Detection & Physics Library: btDeformableBodySolver Class Reference

Bullet Collision Detection & Physics Library

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | Protected Attributes | Private Types | List of all members
btDeformableBodySolver Class Reference

`#include <btDeformableBodySolver.h>`

Inheritance diagram for btDeformableBodySolver:
[legend]
Collaboration diagram for btDeformableBodySolver:
[legend]

## Public Member Functions
| btDeformableBodySolver ()
virtual | ~btDeformableBodySolver ()
virtual SolverTypes | getSolverType () const
| Return the type of the solver.
virtual void | updateSoftBodies ()
| Perform necessary per-step updates of soft bodies such as recomputing normals and bounding boxes.
virtual btScalar | solveContactConstraints (btCollisionObject **deformableBodies, int numDeformableBodies, const btContactSolverInfo &infoGlobal)
virtual void | solveDeformableConstraints (btScalar solverdt)
virtual void | setGravity (const btVector3 &gravity)
virtual void | reinitialize (const btAlignedObjectArray< btSoftBody * > &softBodies, btScalar dt)
virtual void | setConstraints (const btContactSolverInfo &infoGlobal)
virtual void | predictMotion (btScalar solverdt)
| Predict motion of soft bodies into next timestep.
void | predictDeformableMotion (btSoftBody *psb, btScalar dt)
void | backupVelocity ()
virtual void | setupDeformableSolve (bool implicit)
void | revertVelocity ()
void | updateVelocity ()
bool | updateNodes ()
void | computeStep (TVStack &ddv, const TVStack &residual)
btScalar | computeDescentStep (TVStack &ddv, const TVStack &residual, bool verbose=false)
virtual void | copySoftBodyToVertexBuffer (const btSoftBody *const softBody, btVertexBufferDescriptor *vertexBuffer)
virtual void | processCollision (btSoftBody *softBody, const btCollisionObjectWrapper *collisionObjectWrap)
virtual void | processCollision (btSoftBody *softBody, btSoftBody *otherSoftBody)
| Process a collision between two soft bodies.
void | setImplicit (bool implicit)
void | setLineSearch (bool lineSearch)
void | updateState ()
void | updateDv (btScalar scale=1)
void | updateTempPosition ()
void | backupDv ()
void | revertDv ()
void | updateEnergy (btScalar scale)
btScalar | kineticEnergy ()
virtual void | applyExplicitForce ()
virtual void | applyTransforms (btScalar timeStep)
virtual void | setStrainLimiting (bool opt)
virtual void | setPreconditioner (int opt)
virtual btAlignedObjectArray< btDeformableLagrangianForce * > * | getLagrangianForceArray ()
virtual const btAlignedObjectArray< btSoftBody::Node * > * | getIndices ()
virtual void | setProjection ()
virtual void | setLagrangeMultiplier ()
virtual bool | isReducedSolver ()
virtual void | deformableBodyInternalWriteBack ()
virtual void | optimize (btAlignedObjectArray< btSoftBody * > &softBodies, bool forceUpdate=false)
| Optimize soft bodies in this solver.
virtual void | solveConstraints (btScalar dt)
| Solve constraints for a set of soft bodies.
virtual bool | checkInitialized ()
| Ensure that this solver is initialized.
virtual void | copyBackToSoftBodies (bool bMove=true)
| Copy necessary data back to the original soft body source objects.
Public Member Functions inherited from btSoftBodySolver
| btSoftBodySolver ()
virtual | ~btSoftBodySolver ()
virtual SolverTypes | getSolverType () const =0
| Return the type of the solver.
virtual bool | checkInitialized ()=0
| Ensure that this solver is initialized.
virtual void | optimize (btAlignedObjectArray< btSoftBody * > &softBodies, bool forceUpdate=false)=0
| Optimize soft bodies in this solver.
virtual void | copyBackToSoftBodies (bool bMove=true)=0
| Copy necessary data back to the original soft body source objects.
virtual void | predictMotion (btScalar solverdt)=0
| Predict motion of soft bodies into next timestep.
virtual void | solveConstraints (btScalar solverdt)=0
| Solve constraints for a set of soft bodies.
virtual void | updateSoftBodies ()=0
| Perform necessary per-step updates of soft bodies such as recomputing normals and bounding boxes.
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 | processCollision (btSoftBody *, btSoftBody *)=0
| Process a collision between two soft bodies.
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 void | setNumberOfVelocityIterations (int iterations)
| Set the number of velocity constraint solver iterations this solver uses.
virtual int | getNumberOfVelocityIterations ()
| Get the number of velocity constraint solver iterations this solver uses.
float | getTimeScale ()
| Return the timescale that the simulation is using.

## Public Attributes
btDeformableBackwardEulerObjective * | m_objective
bool | m_useProjection

## Protected Attributes
int | m_numNodes
TVStack | m_dv
TVStack | m_backup_dv
TVStack | m_ddv
TVStack | m_residual
btAlignedObjectArray< btSoftBody * > | m_softBodies
TVStack | m_backupVelocity
btScalar | m_dt
btConjugateGradient< btDeformableBackwardEulerObjective > | m_cg
btConjugateResidual< btDeformableBackwardEulerObjective > | m_cr
bool | m_implicit
int | m_maxNewtonIterations
btScalar | m_newtonTolerance
bool | m_lineSearch
bool | m_reducedSolver
Protected Attributes inherited from btSoftBodySolver
int | m_numberOfPositionIterations
int | m_numberOfVelocityIterations
float | m_timeScale

## Private Types
typedef btAlignedObjectArray< btVector3 > | TVStack

## Additional Inherited Members
Public Types inherited from btSoftBodySolver
enum | SolverTypes { DEFAULT_SOLVER , CPU_SOLVER , CL_SOLVER , CL_SIMD_SOLVER , DX_SOLVER , DX_SIMD_SOLVER , DEFORMABLE_SOLVER , REDUCED_DEFORMABLE_SOLVER }

## Detailed Description

Definition at line 30 of file btDeformableBodySolver.h.

## Member Typedef Documentation

## ◆ TVStack

typedef btAlignedObjectArray<btVector3> btDeformableBodySolver::TVStack
| private

Definition at line 32 of file btDeformableBodySolver.h.

## Constructor & Destructor Documentation

## ◆ btDeformableBodySolver()

btDeformableBodySolver::btDeformableBodySolver | ( |  | ) |

Definition at line 22 of file btDeformableBodySolver.cpp.

## ◆ ~btDeformableBodySolver()

btDeformableBodySolver::~btDeformableBodySolver | ( |  | ) |
| virtual

Definition at line 29 of file btDeformableBodySolver.cpp.

## Member Function Documentation

## ◆ applyExplicitForce()

void btDeformableBodySolver::applyExplicitForce | ( |  | ) |
| virtual

Definition at line 509 of file btDeformableBodySolver.cpp.

## ◆ applyTransforms()

void btDeformableBodySolver::applyTransforms | ( | btScalar | timeStep | ) |
| virtual

Reimplemented in btReducedDeformableBodySolver.

Definition at line 514 of file btDeformableBodySolver.cpp.

## ◆ backupDv()

void btDeformableBodySolver::backupDv | ( |  | ) |

Definition at line 140 of file btDeformableBodySolver.cpp.

## ◆ backupVelocity()

void btDeformableBodySolver::backupVelocity | ( |  | ) |

Definition at line 317 of file btDeformableBodySolver.cpp.

## ◆ checkInitialized()

virtual bool btDeformableBodySolver::checkInitialized | ( |  | ) |
| inlinevirtual

Ensure that this solver is initialized.

Implements btSoftBodySolver.

Definition at line 220 of file btDeformableBodySolver.h.

## ◆ computeDescentStep()

btScalar btDeformableBodySolver::computeDescentStep | ( | TVStack & | ddv,
|  | const TVStack & | residual,
|  | bool | verbose = `false`
| ) |  |

Definition at line 166 of file btDeformableBodySolver.cpp.

## ◆ computeStep()

void btDeformableBodySolver::computeStep | ( | TVStack & | ddv,
|  | const TVStack & | residual
| ) |  |

Definition at line 214 of file btDeformableBodySolver.cpp.

## ◆ copyBackToSoftBodies()

virtual void btDeformableBodySolver::copyBackToSoftBodies | ( | bool | bMove = `true` | ) |
| inlinevirtual

Copy necessary data back to the original soft body source objects.

Implements btSoftBodySolver.

Definition at line 221 of file btDeformableBodySolver.h.

## ◆ copySoftBodyToVertexBuffer()

virtual void btDeformableBodySolver::copySoftBodyToVertexBuffer | ( | const btSoftBody *const | softBody,
|  | btVertexBufferDescriptor * | vertexBuffer
| ) |  |
| inlinevirtual

Definition at line 113 of file btDeformableBodySolver.h.

## ◆ deformableBodyInternalWriteBack()

virtual void btDeformableBodySolver::deformableBodyInternalWriteBack | ( |  | ) |
| inlinevirtual

Reimplemented in btReducedDeformableBodySolver.

Definition at line 215 of file btDeformableBodySolver.h.

## ◆ getIndices()

virtual const btAlignedObjectArray< btSoftBody::Node * > * btDeformableBodySolver::getIndices | ( |  | ) |
| inlinevirtual

Definition at line 195 of file btDeformableBodySolver.h.

## ◆ getLagrangianForceArray()

virtual btAlignedObjectArray< btDeformableLagrangianForce * > * btDeformableBodySolver::getLagrangianForceArray | ( |  | ) |
| inlinevirtual

Definition at line 190 of file btDeformableBodySolver.h.

## ◆ getSolverType()

virtual SolverTypes btDeformableBodySolver::getSolverType | ( |  | ) | const
| inlinevirtual

Return the type of the solver.

Implements btSoftBodySolver.

Reimplemented in btReducedDeformableBodySolver.

Definition at line 59 of file btDeformableBodySolver.h.

## ◆ isReducedSolver()

virtual bool btDeformableBodySolver::isReducedSolver | ( |  | ) |
| inlinevirtual

Definition at line 210 of file btDeformableBodySolver.h.

## ◆ kineticEnergy()

btScalar btDeformableBodySolver::kineticEnergy | ( |  | ) |

Definition at line 122 of file btDeformableBodySolver.cpp.

## ◆ optimize()

virtual void btDeformableBodySolver::optimize | ( | btAlignedObjectArray< btSoftBody * > & | softBodies,
|  | bool | forceUpdate = `false`
| ) |  |
| inlinevirtual

Optimize soft bodies in this solver.

Implements btSoftBodySolver.

Definition at line 218 of file btDeformableBodySolver.h.

## ◆ predictDeformableMotion()

void btDeformableBodySolver::predictDeformableMotion | ( | btSoftBody * | psb,
|  | btScalar | dt
| ) |  |

Definition at line 422 of file btDeformableBodySolver.cpp.

## ◆ predictMotion()

void btDeformableBodySolver::predictMotion | ( | btScalar | solverdt | ) |
| virtual

Predict motion of soft bodies into next timestep.

Implements btSoftBodySolver.

Reimplemented in btReducedDeformableBodySolver.

Definition at line 388 of file btDeformableBodySolver.cpp.

## ◆ processCollision() [1/2]

virtual void btDeformableBodySolver::processCollision | ( | btSoftBody * | ,
|  | btSoftBody * |
| ) |  |
| inlinevirtual

Process a collision between two soft bodies.

Implements btSoftBodySolver.

Definition at line 122 of file btDeformableBodySolver.h.

## ◆ processCollision() [2/2]

virtual void btDeformableBodySolver::processCollision | ( | btSoftBody * | softBody,
|  | const btCollisionObjectWrapper * | collisionObjectWrap
| ) |  |
| inlinevirtual

Definition at line 116 of file btDeformableBodySolver.h.

## ◆ reinitialize()

void btDeformableBodySolver::reinitialize | ( | const btAlignedObjectArray< btSoftBody * > & | softBodies,
|  | btScalar | dt
| ) |  |
| virtual

Reimplemented in btReducedDeformableBodySolver.

Definition at line 222 of file btDeformableBodySolver.cpp.

## ◆ revertDv()

void btDeformableBodySolver::revertDv | ( |  | ) |

Definition at line 149 of file btDeformableBodySolver.cpp.

## ◆ revertVelocity()

void btDeformableBodySolver::revertVelocity | ( |  | ) |

Definition at line 362 of file btDeformableBodySolver.cpp.

## ◆ setConstraints()

void btDeformableBodySolver::setConstraints | ( | const btContactSolverInfo & | infoGlobal | ) |
| virtual

Reimplemented in btReducedDeformableBodySolver.

Definition at line 251 of file btDeformableBodySolver.cpp.

## ◆ setGravity()

virtual void btDeformableBodySolver::setGravity | ( | const btVector3 & | gravity | ) |
| inlinevirtual

Reimplemented in btReducedDeformableBodySolver.

Definition at line 73 of file btDeformableBodySolver.h.

## ◆ setImplicit()

void btDeformableBodySolver::setImplicit | ( | bool | implicit | ) |

Definition at line 498 of file btDeformableBodySolver.cpp.

## ◆ setLagrangeMultiplier()

virtual void btDeformableBodySolver::setLagrangeMultiplier | ( |  | ) |
| inlinevirtual

Definition at line 205 of file btDeformableBodySolver.h.

## ◆ setLineSearch()

void btDeformableBodySolver::setLineSearch | ( | bool | lineSearch | ) |

Definition at line 504 of file btDeformableBodySolver.cpp.

## ◆ setPreconditioner()

virtual void btDeformableBodySolver::setPreconditioner | ( | int | opt | ) |
| inlinevirtual

Definition at line 172 of file btDeformableBodySolver.h.

## ◆ setProjection()

virtual void btDeformableBodySolver::setProjection | ( |  | ) |
| inlinevirtual

Definition at line 200 of file btDeformableBodySolver.h.

## ◆ setStrainLimiting()

virtual void btDeformableBodySolver::setStrainLimiting | ( | bool | opt | ) |
| inlinevirtual

Definition at line 167 of file btDeformableBodySolver.h.

## ◆ setupDeformableSolve()

void btDeformableBodySolver::setupDeformableSolve | ( | bool | implicit | ) |
| virtual

Definition at line 330 of file btDeformableBodySolver.cpp.

## ◆ solveConstraints()

virtual void btDeformableBodySolver::solveConstraints | ( | btScalar | solverdt | ) |
| inlinevirtual

Solve constraints for a set of soft bodies.

Implements btSoftBodySolver.

Definition at line 219 of file btDeformableBodySolver.h.

## ◆ solveContactConstraints()

btScalar btDeformableBodySolver::solveContactConstraints | ( | btCollisionObject ** | deformableBodies,
|  | int | numDeformableBodies,
|  | const btContactSolverInfo & | infoGlobal
| ) |  |
| virtual

Reimplemented in btReducedDeformableBodySolver.

Definition at line 257 of file btDeformableBodySolver.cpp.

## ◆ solveDeformableConstraints()

void btDeformableBodySolver::solveDeformableConstraints | ( | btScalar | solverdt | ) |
| virtual

Definition at line 34 of file btDeformableBodySolver.cpp.

## ◆ updateDv()

void btDeformableBodySolver::updateDv | ( | btScalar | scale = `1` | ) |

Definition at line 206 of file btDeformableBodySolver.cpp.

## ◆ updateEnergy()

void btDeformableBodySolver::updateEnergy | ( | btScalar | scale | ) |

Definition at line 157 of file btDeformableBodySolver.cpp.

## ◆ updateNodes()

bool btDeformableBodySolver::updateNodes | ( |  | ) |

Definition at line 375 of file btDeformableBodySolver.cpp.

## ◆ updateSoftBodies()

void btDeformableBodySolver::updateSoftBodies | ( |  | ) |
| virtual

Perform necessary per-step updates of soft bodies such as recomputing normals and bounding boxes.

Implements btSoftBodySolver.

Definition at line 485 of file btDeformableBodySolver.cpp.

## ◆ updateState()

void btDeformableBodySolver::updateState | ( |  | ) |

Definition at line 200 of file btDeformableBodySolver.cpp.

## ◆ updateTempPosition()

void btDeformableBodySolver::updateTempPosition | ( |  | ) |

Definition at line 297 of file btDeformableBodySolver.cpp.

## ◆ updateVelocity()

void btDeformableBodySolver::updateVelocity | ( |  | ) |

Definition at line 264 of file btDeformableBodySolver.cpp.

## Member Data Documentation

## ◆ m_backup_dv

TVStack btDeformableBodySolver::m_backup_dv
| protected

Definition at line 37 of file btDeformableBodySolver.h.

## ◆ m_backupVelocity

TVStack btDeformableBodySolver::m_backupVelocity
| protected

Definition at line 41 of file btDeformableBodySolver.h.

## ◆ m_cg

btConjugateGradient<btDeformableBackwardEulerObjective> btDeformableBodySolver::m_cg
| protected

Definition at line 43 of file btDeformableBodySolver.h.

## ◆ m_cr

btConjugateResidual<btDeformableBackwardEulerObjective> btDeformableBodySolver::m_cr
| protected

Definition at line 44 of file btDeformableBodySolver.h.

## ◆ m_ddv

TVStack btDeformableBodySolver::m_ddv
| protected

Definition at line 38 of file btDeformableBodySolver.h.

## ◆ m_dt

btScalar btDeformableBodySolver::m_dt
| protected

Definition at line 42 of file btDeformableBodySolver.h.

## ◆ m_dv

TVStack btDeformableBodySolver::m_dv
| protected

Definition at line 36 of file btDeformableBodySolver.h.

## ◆ m_implicit

bool btDeformableBodySolver::m_implicit
| protected

Definition at line 45 of file btDeformableBodySolver.h.

## ◆ m_lineSearch

bool btDeformableBodySolver::m_lineSearch
| protected

Definition at line 48 of file btDeformableBodySolver.h.

## ◆ m_maxNewtonIterations

int btDeformableBodySolver::m_maxNewtonIterations
| protected

Definition at line 46 of file btDeformableBodySolver.h.

## ◆ m_newtonTolerance

btScalar btDeformableBodySolver::m_newtonTolerance
| protected

Definition at line 47 of file btDeformableBodySolver.h.

## ◆ m_numNodes

int btDeformableBodySolver::m_numNodes
| protected

Definition at line 35 of file btDeformableBodySolver.h.

## ◆ m_objective

btDeformableBackwardEulerObjective* btDeformableBodySolver::m_objective

Definition at line 52 of file btDeformableBodySolver.h.

## ◆ m_reducedSolver

bool btDeformableBodySolver::m_reducedSolver
| protected

Definition at line 49 of file btDeformableBodySolver.h.

## ◆ m_residual

TVStack btDeformableBodySolver::m_residual
| protected

Definition at line 39 of file btDeformableBodySolver.h.

## ◆ m_softBodies

btAlignedObjectArray<btSoftBody*> btDeformableBodySolver::m_softBodies
| protected

Definition at line 40 of file btDeformableBodySolver.h.

## ◆ m_useProjection

bool btDeformableBodySolver::m_useProjection

Definition at line 53 of file btDeformableBodySolver.h.

The documentation for this class was generated from the following files:

- btDeformableBodySolver.h
- btDeformableBodySolver.cpp