Bullet Collision Detection & Physics Library
|
The btSequentialImpulseConstraintSolver is a fast SIMD implementation of the Projected Gauss Seidel (iterative LCP) method. More...
#include <btSequentialImpulseConstraintSolver.h>
Public Attributes | |
btSolverAnalyticsData | m_analyticsData |
Protected Member Functions | |
void | setupSolverFunctions (bool useSimd) |
void | setupFrictionConstraint (btSolverConstraint &solverConstraint, const btVector3 &normalAxis, int solverBodyIdA, int solverBodyIdB, btManifoldPoint &cp, const btVector3 &rel_pos1, const btVector3 &rel_pos2, btCollisionObject *colObj0, btCollisionObject *colObj1, btScalar relaxation, const btContactSolverInfo &infoGlobal, btScalar desiredVelocity=0., btScalar cfmSlip=0.) |
void | setupTorsionalFrictionConstraint (btSolverConstraint &solverConstraint, const btVector3 &normalAxis, int solverBodyIdA, int solverBodyIdB, btManifoldPoint &cp, btScalar combinedTorsionalFriction, const btVector3 &rel_pos1, const btVector3 &rel_pos2, btCollisionObject *colObj0, btCollisionObject *colObj1, btScalar relaxation, btScalar desiredVelocity=0., btScalar cfmSlip=0.) |
btSolverConstraint & | addFrictionConstraint (const btVector3 &normalAxis, int solverBodyIdA, int solverBodyIdB, int frictionIndex, btManifoldPoint &cp, const btVector3 &rel_pos1, const btVector3 &rel_pos2, btCollisionObject *colObj0, btCollisionObject *colObj1, btScalar relaxation, const btContactSolverInfo &infoGlobal, btScalar desiredVelocity=0., btScalar cfmSlip=0.) |
btSolverConstraint & | addTorsionalFrictionConstraint (const btVector3 &normalAxis, int solverBodyIdA, int solverBodyIdB, int frictionIndex, btManifoldPoint &cp, btScalar torsionalFriction, const btVector3 &rel_pos1, const btVector3 &rel_pos2, btCollisionObject *colObj0, btCollisionObject *colObj1, btScalar relaxation, btScalar desiredVelocity=0, btScalar cfmSlip=0.f) |
void | setupContactConstraint (btSolverConstraint &solverConstraint, int solverBodyIdA, int solverBodyIdB, btManifoldPoint &cp, const btContactSolverInfo &infoGlobal, btScalar &relaxation, const btVector3 &rel_pos1, const btVector3 &rel_pos2) |
void | setFrictionConstraintImpulse (btSolverConstraint &solverConstraint, int solverBodyIdA, int solverBodyIdB, btManifoldPoint &cp, const btContactSolverInfo &infoGlobal) |
btScalar | restitutionCurve (btScalar rel_vel, btScalar restitution, btScalar velocityThreshold) |
virtual void | convertContacts (btPersistentManifold **manifoldPtr, int numManifolds, const btContactSolverInfo &infoGlobal) |
void | convertContact (btPersistentManifold *manifold, const btContactSolverInfo &infoGlobal) |
virtual void | convertJoints (btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal) |
void | convertJoint (btSolverConstraint *currentConstraintRow, btTypedConstraint *constraint, const btTypedConstraint::btConstraintInfo1 &info1, int solverBodyIdA, int solverBodyIdB, const btContactSolverInfo &infoGlobal) |
virtual void | convertBodies (btCollisionObject **bodies, int numBodies, const btContactSolverInfo &infoGlobal) |
btScalar | resolveSplitPenetrationSIMD (btSolverBody &bodyA, btSolverBody &bodyB, const btSolverConstraint &contactConstraint) |
btScalar | resolveSplitPenetrationImpulseCacheFriendly (btSolverBody &bodyA, btSolverBody &bodyB, const btSolverConstraint &contactConstraint) |
int | getOrInitSolverBody (btCollisionObject &body, btScalar timeStep) |
void | initSolverBody (btSolverBody *solverBody, btCollisionObject *collisionObject, btScalar timeStep) |
btScalar | resolveSingleConstraintRowGeneric (btSolverBody &bodyA, btSolverBody &bodyB, const btSolverConstraint &contactConstraint) |
btScalar | resolveSingleConstraintRowGenericSIMD (btSolverBody &bodyA, btSolverBody &bodyB, const btSolverConstraint &contactConstraint) |
btScalar | resolveSingleConstraintRowLowerLimit (btSolverBody &bodyA, btSolverBody &bodyB, const btSolverConstraint &contactConstraint) |
btScalar | resolveSingleConstraintRowLowerLimitSIMD (btSolverBody &bodyA, btSolverBody &bodyB, const btSolverConstraint &contactConstraint) |
btScalar | resolveSplitPenetrationImpulse (btSolverBody &bodyA, btSolverBody &bodyB, const btSolverConstraint &contactConstraint) |
void | writeBackContacts (int iBegin, int iEnd, const btContactSolverInfo &infoGlobal) |
void | writeBackJoints (int iBegin, int iEnd, const btContactSolverInfo &infoGlobal) |
void | writeBackBodies (int iBegin, int iEnd, const btContactSolverInfo &infoGlobal) |
virtual void | solveGroupCacheFriendlySplitImpulseIterations (btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer) |
virtual btScalar | solveGroupCacheFriendlyFinish (btCollisionObject **bodies, int numBodies, const btContactSolverInfo &infoGlobal) |
virtual btScalar | solveSingleIteration (int iteration, btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer) |
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) |
Static Protected Member Functions | |
static void | applyAnisotropicFriction (btCollisionObject *colObj, btVector3 &frictionDirection, int frictionMode) |
The btSequentialImpulseConstraintSolver is a fast SIMD implementation of the Projected Gauss Seidel (iterative LCP) method.
Definition at line 50 of file btSequentialImpulseConstraintSolver.h.
btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver | ( | ) |
Definition at line 353 of file btSequentialImpulseConstraintSolver.cpp.
|
virtual |
Definition at line 385 of file btSequentialImpulseConstraintSolver.cpp.
|
protected |
Definition at line 610 of file btSequentialImpulseConstraintSolver.cpp.
|
protected |
Definition at line 682 of file btSequentialImpulseConstraintSolver.cpp.
|
staticprotected |
Definition at line 504 of file btSequentialImpulseConstraintSolver.cpp.
btSequentialImpulseConstraintSolver::BT_DECLARE_ALIGNED_ALLOCATOR | ( | ) |
unsigned long btSequentialImpulseConstraintSolver::btRand2 | ( | ) |
Definition at line 420 of file btSequentialImpulseConstraintSolver.cpp.
int btSequentialImpulseConstraintSolver::btRandInt2 | ( | int | n | ) |
Definition at line 427 of file btSequentialImpulseConstraintSolver.cpp.
|
protectedvirtual |
Reimplemented in btSequentialImpulseConstraintSolverMt.
Definition at line 1358 of file btSequentialImpulseConstraintSolver.cpp.
|
protected |
avoid collision response between two static objects
Bullet has several options to set the friction directions By default, each contact has only a single friction direction that is recomputed automatically very frame based on the relative linear velocity. If the relative velocity it zero, it will automatically compute a friction direction.
You can also enable two friction directions, using the SOLVER_USE_2_FRICTION_DIRECTIONS. In that case, the second friction direction will be orthogonal to both contact normal and first friction direction.
If you choose SOLVER_DISABLE_VELOCITY_DEPENDENT_FRICTION_DIRECTION, then the friction will be independent from the relative projected velocity.
The user can manually override the friction directions for certain contacts using a contact callback, and use contactPoint.m_contactPointFlags |= BT_CONTACT_FLAG_LATERAL_FRICTION_INITIALIZED In that case, you can set the target relative motion in each friction direction (cp.m_contactMotion1 and cp.m_contactMotion2) this will give a conveyor belt effect
Definition at line 999 of file btSequentialImpulseConstraintSolver.cpp.
|
protectedvirtual |
Reimplemented in btMultiBodyConstraintSolver, and btSequentialImpulseConstraintSolverMt.
Definition at line 1149 of file btSequentialImpulseConstraintSolver.cpp.
|
protected |
the size of btSolverConstraint needs be a multiple of btScalar
finalize the constraint setup
Definition at line 1162 of file btSequentialImpulseConstraintSolver.cpp.
|
protectedvirtual |
setup the btSolverConstraints
Reimplemented in btSequentialImpulseConstraintSolverMt.
Definition at line 1294 of file btSequentialImpulseConstraintSolver.cpp.
|
inline |
Definition at line 184 of file btSequentialImpulseConstraintSolver.h.
|
inline |
Definition at line 192 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 691 of file btSequentialImpulseConstraintSolver.cpp.
|
inline |
Definition at line 174 of file btSequentialImpulseConstraintSolver.h.
btSingleConstraintRowSolver btSequentialImpulseConstraintSolver::getScalarConstraintRowSolverGeneric | ( | ) |
Various implementations of solving a single constraint row using a generic equality constraint, using scalar reference, SSE2 or SSE4.
Definition at line 389 of file btSequentialImpulseConstraintSolver.cpp.
btSingleConstraintRowSolver btSequentialImpulseConstraintSolver::getScalarConstraintRowSolverLowerLimit | ( | ) |
Various implementations of solving a single constraint row using an inequality (lower limit) constraint, using scalar reference, SSE2 or SSE4.
Definition at line 394 of file btSequentialImpulseConstraintSolver.cpp.
|
inlinevirtual |
Implements btConstraintSolver.
Reimplemented in btNNCGConstraintSolver, btMultiBodyMLCPConstraintSolver, and btMLCPSolver.
Definition at line 179 of file btSequentialImpulseConstraintSolver.h.
btSingleConstraintRowSolver btSequentialImpulseConstraintSolver::getSSE2ConstraintRowSolverGeneric | ( | ) |
btSingleConstraintRowSolver btSequentialImpulseConstraintSolver::getSSE2ConstraintRowSolverLowerLimit | ( | ) |
btSingleConstraintRowSolver btSequentialImpulseConstraintSolver::getSSE4_1ConstraintRowSolverGeneric | ( | ) |
btSingleConstraintRowSolver btSequentialImpulseConstraintSolver::getSSE4_1ConstraintRowSolverLowerLimit | ( | ) |
|
protected |
Definition at line 459 of file btSequentialImpulseConstraintSolver.cpp.
|
virtual |
clear internal cached data and reset random seed
Implements btConstraintSolver.
Definition at line 1872 of file btSequentialImpulseConstraintSolver.cpp.
|
protected |
Definition at line 269 of file btSequentialImpulseConstraintSolver.cpp.
|
protected |
Definition at line 263 of file btSequentialImpulseConstraintSolver.cpp.
|
protected |
Definition at line 279 of file btSequentialImpulseConstraintSolver.cpp.
|
protected |
Definition at line 274 of file btSequentialImpulseConstraintSolver.cpp.
|
inlineprotected |
Definition at line 139 of file btSequentialImpulseConstraintSolver.h.
|
inlineprotected |
Definition at line 126 of file btSequentialImpulseConstraintSolver.h.
|
inlineprotected |
Definition at line 121 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 494 of file btSequentialImpulseConstraintSolver.cpp.
|
inline |
Definition at line 188 of file btSequentialImpulseConstraintSolver.h.
|
inline |
Definition at line 196 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 981 of file btSequentialImpulseConstraintSolver.cpp.
|
inline |
Definition at line 170 of file btSequentialImpulseConstraintSolver.h.
|
protected |
warm starting (or zero if disabled)
Definition at line 796 of file btSequentialImpulseConstraintSolver.cpp.
|
protected |
Definition at line 518 of file btSequentialImpulseConstraintSolver.cpp.
|
protected |
Definition at line 360 of file btSequentialImpulseConstraintSolver.cpp.
|
protected |
Definition at line 619 of file btSequentialImpulseConstraintSolver.cpp.
|
virtual |
btSequentialImpulseConstraintSolver Sequentially applies impulses
Implements btConstraintSolver.
Reimplemented in btMultiBodyConstraintSolver.
Definition at line 1858 of file btSequentialImpulseConstraintSolver.cpp.
|
protectedvirtual |
Reimplemented in btNNCGConstraintSolver, btMultiBodyConstraintSolver, and btSequentialImpulseConstraintSolverMt.
Definition at line 1836 of file btSequentialImpulseConstraintSolver.cpp.
|
protectedvirtual |
this is a special step to resolve penetrations (just for contacts)
Reimplemented in btMultiBodyMLCPConstraintSolver, and btMLCPSolver.
Definition at line 1730 of file btSequentialImpulseConstraintSolver.cpp.
|
protectedvirtual |
Reimplemented in btNNCGConstraintSolver, btMultiBodyConstraintSolver, btMLCPSolver, btSequentialImpulseConstraintSolverMt, and btMultiBodyMLCPConstraintSolver.
Definition at line 1403 of file btSequentialImpulseConstraintSolver.cpp.
|
protectedvirtual |
Reimplemented in btSequentialImpulseConstraintSolverMt.
Definition at line 1697 of file btSequentialImpulseConstraintSolver.cpp.
|
protectedvirtual |
solve all joint constraints
solve all contact constraints
solve all friction constraints
Reimplemented in btNNCGConstraintSolver, btMultiBodyConstraintSolver, and btSequentialImpulseConstraintSolverMt.
Definition at line 1526 of file btSequentialImpulseConstraintSolver.cpp.
|
protected |
Definition at line 1808 of file btSequentialImpulseConstraintSolver.cpp.
|
protected |
Definition at line 1765 of file btSequentialImpulseConstraintSolver.cpp.
|
protected |
Definition at line 1785 of file btSequentialImpulseConstraintSolver.cpp.
btSolverAnalyticsData btSequentialImpulseConstraintSolver::m_analyticsData |
Definition at line 212 of file btSequentialImpulseConstraintSolver.h.
|
protected |
m_btSeed2 is used for re-arranging the constraint rows. improves convergence/quality of friction
Definition at line 108 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 80 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 67 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 75 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 83 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 66 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 64 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 63 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 62 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 77 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 78 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 79 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 65 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 56 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 57 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 59 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 60 of file btSequentialImpulseConstraintSolver.h.
|
protected |
Definition at line 58 of file btSequentialImpulseConstraintSolver.h.