Blender
V3.3
|
original version written by Erwin Coumans, October 2013 More...
#include <btMLCPSolver.h>
Public Member Functions | |
btMLCPSolver (btMLCPSolverInterface *solver) | |
original version written by Erwin Coumans, October 2013 More... | |
virtual | ~btMLCPSolver () |
void | setMLCPSolver (btMLCPSolverInterface *solver) |
int | getNumFallbacks () const |
void | setNumFallbacks (int num) |
virtual btConstraintSolverType | getSolverType () const |
Protected Member Functions | |
virtual btScalar | solveGroupCacheFriendlySetup (btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer) |
virtual btScalar | solveGroupCacheFriendlyIterations (btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer) |
virtual void | createMLCP (const btContactSolverInfo &infoGlobal) |
virtual void | createMLCPFast (const btContactSolverInfo &infoGlobal) |
virtual bool | solveMLCP (const btContactSolverInfo &infoGlobal) |
Protected Attributes | |
btMatrixXu | m_A |
btVectorXu | m_b |
btVectorXu | m_x |
btVectorXu | m_lo |
btVectorXu | m_hi |
btVectorXu | m_bSplit |
when using 'split impulse' we solve two separate (M)LCPs More... | |
btVectorXu | m_xSplit |
btVectorXu | m_bSplit1 |
btVectorXu | m_xSplit2 |
btAlignedObjectArray< int > | m_limitDependencies |
btAlignedObjectArray< btSolverConstraint * > | m_allConstraintPtrArray |
btMLCPSolverInterface * | m_solver |
int | m_fallback |
btMatrixXu | m_scratchJ3 |
btMatrixXu | m_scratchJInvM3 |
btAlignedObjectArray< int > | m_scratchOfs |
btMatrixXu | m_scratchMInv |
btMatrixXu | m_scratchJ |
btMatrixXu | m_scratchJTranspose |
btMatrixXu | m_scratchTmp |
original version written by Erwin Coumans, October 2013
Definition at line 24 of file btMLCPSolver.h.
btMLCPSolver::btMLCPSolver | ( | btMLCPSolverInterface * | solver | ) |
original version written by Erwin Coumans, October 2013
Definition at line 22 of file btMLCPSolver.cpp.
|
virtual |
Definition at line 28 of file btMLCPSolver.cpp.
|
protectedvirtual |
Definition at line 458 of file btMLCPSolver.cpp.
References BT_PROFILE, btMatrixXu, btSolverBody, btSolverConstraint, btVector3, Freestyle::c, btRigidBody::getInvInertiaTensorWorld(), infoGlobal, m_A, m_allConstraintPtrArray, m_b, m_bSplit, m_contactNormal1, m_contactNormal2, btContactSolverInfoData::m_globalCfm, m_hi, m_jacDiagABInv, m_lo, m_originalBody, m_relpos1CrossNormal, m_relpos2CrossNormal, m_scratchJ, m_scratchJTranspose, m_scratchMInv, m_scratchTmp, btContactSolverInfoData::m_splitImpulse, btContactSolverInfoData::m_timeStep, m_x, m_xSplit, numBodies, r, setElem(), and btAlignedObjectArray< T >::size().
Referenced by solveGroupCacheFriendlySetup().
|
protectedvirtual |
fill the upper triangle of the matrix, to make it symmetric
Definition at line 148 of file btMLCPSolver.cpp.
References BT_INFINITY, BT_PROFILE, btFuzzyZero(), btMatrixXu, btSolverConstraint, btVector3, Freestyle::c, btAlignedObjectArray< T >::expand(), btRigidBody::getInvInertiaTensorWorld(), btRigidBody::getInvMass(), infoGlobal, interleaveContactAndFriction, m_A, m_allConstraintPtrArray, m_b, m_bSplit, m_contactNormal1, m_contactNormal2, btContactSolverInfoData::m_globalCfm, m_hi, m_lo, m_relpos1CrossNormal, m_relpos2CrossNormal, m_scratchJ3, m_scratchJInvM3, m_scratchOfs, btContactSolverInfoData::m_solverMode, btContactSolverInfoData::m_timeStep, m_tmpConstraintSizesPool, m_tmpSolverNonContactConstraintPool, m_x, m_xSplit, numBodies, r, btAlignedObjectArray< T >::reserve(), btAlignedObjectArray< T >::resize(), btAlignedObjectArray< T >::resizeNoInitialize(), btAlignedObjectArray< T >::size(), and SOLVER_USE_WARMSTARTING.
Referenced by solveGroupCacheFriendlySetup().
|
inline |
Definition at line 73 of file btMLCPSolver.h.
References m_fallback.
|
inlinevirtual |
Definition at line 82 of file btMLCPSolver.h.
References BT_MLCP_SOLVER.
|
inline |
Definition at line 68 of file btMLCPSolver.h.
References m_solver.
|
inline |
Definition at line 77 of file btMLCPSolver.h.
References m_fallback.
|
protectedvirtual |
Definition at line 570 of file btMLCPSolver.cpp.
References BT_PROFILE, btSolverBody, btSolverConstraint, Freestyle::c, constraints, infoGlobal, m_allConstraintPtrArray, m_fallback, btContactSolverInfoData::m_splitImpulse, m_x, m_xSplit, manifoldPtr, numBodies, numConstraints, numManifolds, result, btAlignedObjectArray< T >::size(), solveGroupCacheFriendlyIterations(), and solveMLCP().
|
protectedvirtual |
The btSequentialImpulseConstraintSolver moves all friction constraints at the very end, we can also interleave them instead
Definition at line 35 of file btMLCPSolver.cpp.
References BT_PROFILE, btAssert, constraints, createMLCP(), createMLCPFast(), gUseMatrixMultiply, infoGlobal, interleaveContactAndFriction, m_A, m_allConstraintPtrArray, m_b, m_hi, m_limitDependencies, m_lo, m_tmpSolverContactConstraintPool, m_tmpSolverContactFrictionConstraintPool, m_tmpSolverNonContactConstraintPool, m_x, manifoldPtr, numConstraints, numManifolds, btAlignedObjectArray< T >::push_back(), btAlignedObjectArray< T >::resize(), btAlignedObjectArray< T >::size(), and solveGroupCacheFriendlySetup().
|
protectedvirtual |
Definition at line 116 of file btMLCPSolver.cpp.
References btMatrixXu, infoGlobal, m_A, m_b, m_bSplit, m_hi, m_limitDependencies, m_lo, btContactSolverInfoData::m_numIterations, m_solver, btContactSolverInfoData::m_splitImpulse, m_x, m_xSplit, result, and btMLCPSolverInterface::solveMLCP().
Referenced by solveGroupCacheFriendlyIterations().
|
protected |
Definition at line 27 of file btMLCPSolver.h.
Referenced by createMLCP(), createMLCPFast(), solveGroupCacheFriendlySetup(), and solveMLCP().
|
protected |
Definition at line 40 of file btMLCPSolver.h.
Referenced by createMLCP(), createMLCPFast(), solveGroupCacheFriendlyIterations(), and solveGroupCacheFriendlySetup().
|
protected |
Definition at line 28 of file btMLCPSolver.h.
Referenced by createMLCP(), createMLCPFast(), solveGroupCacheFriendlySetup(), and solveMLCP().
|
protected |
when using 'split impulse' we solve two separate (M)LCPs
Definition at line 34 of file btMLCPSolver.h.
Referenced by createMLCP(), createMLCPFast(), and solveMLCP().
|
protected |
Definition at line 36 of file btMLCPSolver.h.
|
protected |
Definition at line 42 of file btMLCPSolver.h.
Referenced by getNumFallbacks(), setNumFallbacks(), and solveGroupCacheFriendlyIterations().
|
protected |
Definition at line 31 of file btMLCPSolver.h.
Referenced by createMLCP(), createMLCPFast(), solveGroupCacheFriendlySetup(), and solveMLCP().
|
protected |
Definition at line 39 of file btMLCPSolver.h.
Referenced by solveGroupCacheFriendlySetup(), and solveMLCP().
|
protected |
Definition at line 30 of file btMLCPSolver.h.
Referenced by createMLCP(), createMLCPFast(), solveGroupCacheFriendlySetup(), and solveMLCP().
|
protected |
Definition at line 51 of file btMLCPSolver.h.
Referenced by createMLCP().
|
protected |
The following scratch variables are not stateful – contents are cleared prior to each use. They are only cached here to avoid extra memory allocations and deallocations and to ensure that multiple instances of the solver can be run in parallel.
Definition at line 47 of file btMLCPSolver.h.
Referenced by createMLCPFast().
|
protected |
Definition at line 48 of file btMLCPSolver.h.
Referenced by createMLCPFast().
|
protected |
Definition at line 52 of file btMLCPSolver.h.
Referenced by createMLCP().
|
protected |
Definition at line 50 of file btMLCPSolver.h.
Referenced by createMLCP().
|
protected |
Definition at line 49 of file btMLCPSolver.h.
Referenced by createMLCPFast().
|
protected |
Definition at line 53 of file btMLCPSolver.h.
Referenced by createMLCP().
|
protected |
Definition at line 41 of file btMLCPSolver.h.
Referenced by setMLCPSolver(), and solveMLCP().
|
protected |
Definition at line 29 of file btMLCPSolver.h.
Referenced by createMLCP(), createMLCPFast(), solveGroupCacheFriendlyIterations(), solveGroupCacheFriendlySetup(), and solveMLCP().
|
protected |
Definition at line 35 of file btMLCPSolver.h.
Referenced by createMLCP(), createMLCPFast(), solveGroupCacheFriendlyIterations(), and solveMLCP().
|
protected |
Definition at line 37 of file btMLCPSolver.h.