Blender  V3.3
Public Member Functions | Protected Attributes | List of all members
btDefaultSoftBodySolver Class Reference

#include <btDefaultSoftBodySolver.h>

Inheritance diagram for btDefaultSoftBodySolver:
btSoftBodySolver

Public Member Functions

 btDefaultSoftBodySolver ()
 
virtual ~btDefaultSoftBodySolver ()
 
virtual SolverTypes getSolverType () const
 
virtual bool checkInitialized ()
 
virtual void updateSoftBodies ()
 
virtual void optimize (btAlignedObjectArray< btSoftBody * > &softBodies, bool forceUpdate=false)
 
virtual void copyBackToSoftBodies (bool bMove=true)
 
virtual void solveConstraints (btScalar solverdt)
 
virtual void predictMotion (btScalar solverdt)
 
virtual void copySoftBodyToVertexBuffer (const btSoftBody *const softBody, btVertexBufferDescriptor *vertexBuffer)
 
virtual void processCollision (btSoftBody *, const btCollisionObjectWrapper *)
 
virtual void processCollision (btSoftBody *, btSoftBody *)
 
- Public Member Functions inherited from btSoftBodySolver
 btSoftBodySolver ()
 
virtual ~btSoftBodySolver ()
 
virtual void processCollision (btSoftBody *, const struct btCollisionObjectWrapper *)=0
 
virtual void setNumberOfPositionIterations (int iterations)
 
virtual int getNumberOfPositionIterations ()
 
virtual void setNumberOfVelocityIterations (int iterations)
 
virtual int getNumberOfVelocityIterations ()
 
float getTimeScale ()
 

Protected Attributes

bool m_updateSolverConstants
 
btAlignedObjectArray< btSoftBody * > m_softBodySet
 
- Protected Attributes inherited from btSoftBodySolver
int m_numberOfPositionIterations
 
int m_numberOfVelocityIterations
 
float m_timeScale
 

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
}
 

Detailed Description

Definition at line 23 of file btDefaultSoftBodySolver.h.

Constructor & Destructor Documentation

◆ btDefaultSoftBodySolver()

btDefaultSoftBodySolver::btDefaultSoftBodySolver ( )

Definition at line 24 of file btDefaultSoftBodySolver.cpp.

References m_updateSolverConstants.

◆ ~btDefaultSoftBodySolver()

btDefaultSoftBodySolver::~btDefaultSoftBodySolver ( )
virtual

Definition at line 32 of file btDefaultSoftBodySolver.cpp.

Member Function Documentation

◆ checkInitialized()

bool btDefaultSoftBodySolver::checkInitialized ( )
virtual

Ensure that this solver is initialized.

Implements btSoftBodySolver.

Definition at line 58 of file btDefaultSoftBodySolver.cpp.

◆ copyBackToSoftBodies()

void btDefaultSoftBodySolver::copyBackToSoftBodies ( bool  bMove = true)
virtual

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

Implements btSoftBodySolver.

Definition at line 37 of file btDefaultSoftBodySolver.cpp.

◆ copySoftBodyToVertexBuffer()

void btDefaultSoftBodySolver::copySoftBodyToVertexBuffer ( const btSoftBody *const  softBody,
btVertexBufferDescriptor vertexBuffer 
)
virtual

◆ getSolverType()

virtual SolverTypes btDefaultSoftBodySolver::getSolverType ( ) const
inlinevirtual

Return the type of the solver.

Implements btSoftBodySolver.

Definition at line 36 of file btDefaultSoftBodySolver.h.

References btSoftBodySolver::DEFAULT_SOLVER.

◆ optimize()

void btDefaultSoftBodySolver::optimize ( btAlignedObjectArray< btSoftBody * > &  softBodies,
bool  forceUpdate = false 
)
virtual

Optimize soft bodies in this solver.

Implements btSoftBodySolver.

Definition at line 41 of file btDefaultSoftBodySolver.cpp.

References btAlignedObjectArray< T >::copyFromArray(), and m_softBodySet.

◆ predictMotion()

void btDefaultSoftBodySolver::predictMotion ( btScalar  solverdt)
virtual

Predict motion of soft bodies into next timestep

Implements btSoftBodySolver.

Definition at line 135 of file btDefaultSoftBodySolver.cpp.

References m_softBodySet, btSoftBody::predictMotion(), and btAlignedObjectArray< T >::size().

◆ processCollision() [1/2]

void btDefaultSoftBodySolver::processCollision ( btSoftBody ,
btSoftBody  
)
virtual

Process a collision between two soft bodies

Implements btSoftBodySolver.

Definition at line 124 of file btDefaultSoftBodySolver.cpp.

References btSoftBody::defaultCollisionHandler().

◆ processCollision() [2/2]

void btDefaultSoftBodySolver::processCollision ( btSoftBody softBody,
const btCollisionObjectWrapper collisionObjectWrap 
)
virtual

◆ solveConstraints()

void btDefaultSoftBodySolver::solveConstraints ( btScalar  solverdt)
virtual

Solve constraints for a set of soft bodies

Implements btSoftBodySolver.

Definition at line 63 of file btDefaultSoftBodySolver.cpp.

References m_softBodySet, btAlignedObjectArray< T >::size(), and btSoftBody::solveConstraints().

◆ updateSoftBodies()

void btDefaultSoftBodySolver::updateSoftBodies ( )
virtual

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

Implements btSoftBodySolver.

Definition at line 46 of file btDefaultSoftBodySolver.cpp.

References btSoftBody::integrateMotion(), m_softBodySet, and btAlignedObjectArray< T >::size().

Member Data Documentation

◆ m_softBodySet

btAlignedObjectArray<btSoftBody *> btDefaultSoftBodySolver::m_softBodySet
protected

◆ m_updateSolverConstants

bool btDefaultSoftBodySolver::m_updateSolverConstants
protected

Variable to define whether we need to update solver constants on the next iteration

Definition at line 27 of file btDefaultSoftBodySolver.h.

Referenced by btDefaultSoftBodySolver().


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