The btSequentialImpulseConstraintSolver is a fast SIMD implementation of the Projected Gauss Seidel (iterative LCP) method. More...
#include <btSequentialImpulseConstraintSolver.h>
Public Member Functions | |
unsigned long | btRand2 () |
int | btRandInt2 (int n) |
btSequentialImpulseConstraintSolver () | |
unsigned long | getRandSeed () const |
virtual void | reset () |
clear internal cached data and reset random seed | |
void | setRandSeed (unsigned long seed) |
virtual btScalar | solveGroup (btCollisionObject **bodies, int numBodies, btPersistentManifold **manifold, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &info, btIDebugDraw *debugDrawer, btStackAlloc *stackAlloc, btDispatcher *dispatcher) |
solve a group of constraints | |
virtual | ~btSequentialImpulseConstraintSolver () |
Protected Member Functions | |
btSolverConstraint & | addFrictionConstraint (const btVector3 &normalAxis, btRigidBody *solverBodyA, btRigidBody *solverBodyB, int frictionIndex, btManifoldPoint &cp, const btVector3 &rel_pos1, const btVector3 &rel_pos2, btCollisionObject *colObj0, btCollisionObject *colObj1, btScalar relaxation, btScalar desiredVelocity=0., btScalar cfmSlip=0.) |
void | convertContact (btPersistentManifold *manifold, const btContactSolverInfo &infoGlobal) |
int | getOrInitSolverBody (btCollisionObject &body) |
void | resolveSingleConstraintRowGeneric (btRigidBody &body1, btRigidBody &body2, const btSolverConstraint &contactConstraint) |
void | resolveSingleConstraintRowGenericSIMD (btRigidBody &body1, btRigidBody &body2, const btSolverConstraint &contactConstraint) |
void | resolveSingleConstraintRowLowerLimit (btRigidBody &body1, btRigidBody &body2, const btSolverConstraint &contactConstraint) |
void | resolveSingleConstraintRowLowerLimitSIMD (btRigidBody &body1, btRigidBody &body2, const btSolverConstraint &contactConstraint) |
void | resolveSplitPenetrationImpulseCacheFriendly (btRigidBody &body1, btRigidBody &body2, const btSolverConstraint &contactConstraint) |
void | resolveSplitPenetrationSIMD (btRigidBody &body1, btRigidBody &body2, const btSolverConstraint &contactConstraint) |
btScalar | restitutionCurve (btScalar rel_vel, btScalar restitution) |
void | setFrictionConstraintImpulse (btSolverConstraint &solverConstraint, btRigidBody *rb0, btRigidBody *rb1, btManifoldPoint &cp, const btContactSolverInfo &infoGlobal) |
void | setupContactConstraint (btSolverConstraint &solverConstraint, btCollisionObject *colObj0, btCollisionObject *colObj1, btManifoldPoint &cp, const btContactSolverInfo &infoGlobal, btVector3 &vel, btScalar &rel_vel, btScalar &relaxation, btVector3 &rel_pos1, btVector3 &rel_pos2) |
void | setupFrictionConstraint (btSolverConstraint &solverConstraint, const btVector3 &normalAxis, btRigidBody *solverBodyA, btRigidBody *solverBodyIdB, btManifoldPoint &cp, const btVector3 &rel_pos1, const btVector3 &rel_pos2, btCollisionObject *colObj0, btCollisionObject *colObj1, btScalar relaxation, btScalar desiredVelocity=0., btScalar cfmSlip=0.) |
virtual btScalar | solveGroupCacheFriendlyFinish (btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer, btStackAlloc *stackAlloc) |
virtual btScalar | solveGroupCacheFriendlyIterations (btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer, btStackAlloc *stackAlloc) |
virtual btScalar | solveGroupCacheFriendlySetup (btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer, btStackAlloc *stackAlloc) |
virtual void | solveGroupCacheFriendlySplitImpulseIterations (btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer, btStackAlloc *stackAlloc) |
btScalar | solveSingleIteration (int iteration, btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer, btStackAlloc *stackAlloc) |
Static Protected Member Functions | |
static btRigidBody & | getFixedBody () |
Protected Attributes | |
unsigned long | m_btSeed2 |
m_btSeed2 is used for re-arranging the constraint rows. improves convergence/quality of friction | |
btAlignedObjectArray< int > | m_orderFrictionConstraintPool |
btAlignedObjectArray< int > | m_orderTmpConstraintPool |
btAlignedObjectArray < btTypedConstraint::btConstraintInfo1 > | m_tmpConstraintSizesPool |
btConstraintArray | m_tmpSolverContactConstraintPool |
btConstraintArray | m_tmpSolverContactFrictionConstraintPool |
btConstraintArray | m_tmpSolverNonContactConstraintPool |
The btSequentialImpulseConstraintSolver is a fast SIMD implementation of the Projected Gauss Seidel (iterative LCP) method.
Definition at line 28 of file btSequentialImpulseConstraintSolver.h.
virtual btSequentialImpulseConstraintSolver::~btSequentialImpulseConstraintSolver | ( | ) | [virtual] |
btSolverConstraint& btSequentialImpulseConstraintSolver::addFrictionConstraint | ( | const btVector3 & | normalAxis, |
btRigidBody * | solverBodyA, | ||
btRigidBody * | solverBodyB, | ||
int | frictionIndex, | ||
btManifoldPoint & | cp, | ||
const btVector3 & | rel_pos1, | ||
const btVector3 & | rel_pos2, | ||
btCollisionObject * | colObj0, | ||
btCollisionObject * | colObj1, | ||
btScalar | relaxation, | ||
btScalar | desiredVelocity = 0. , |
||
btScalar | cfmSlip = 0. |
||
) | [protected] |
unsigned long btSequentialImpulseConstraintSolver::btRand2 | ( | ) |
int btSequentialImpulseConstraintSolver::btRandInt2 | ( | int | n | ) |
void btSequentialImpulseConstraintSolver::convertContact | ( | btPersistentManifold * | manifold, |
const btContactSolverInfo & | infoGlobal | ||
) | [protected] |
static btRigidBody& btSequentialImpulseConstraintSolver::getFixedBody | ( | ) | [static, protected] |
int btSequentialImpulseConstraintSolver::getOrInitSolverBody | ( | btCollisionObject & | body | ) | [protected] |
unsigned long btSequentialImpulseConstraintSolver::getRandSeed | ( | ) | const [inline] |
Definition at line 115 of file btSequentialImpulseConstraintSolver.h.
virtual void btSequentialImpulseConstraintSolver::reset | ( | ) | [virtual] |
clear internal cached data and reset random seed
Implements btConstraintSolver.
void btSequentialImpulseConstraintSolver::resolveSingleConstraintRowGeneric | ( | btRigidBody & | body1, |
btRigidBody & | body2, | ||
const btSolverConstraint & | contactConstraint | ||
) | [protected] |
void btSequentialImpulseConstraintSolver::resolveSingleConstraintRowGenericSIMD | ( | btRigidBody & | body1, |
btRigidBody & | body2, | ||
const btSolverConstraint & | contactConstraint | ||
) | [protected] |
void btSequentialImpulseConstraintSolver::resolveSingleConstraintRowLowerLimit | ( | btRigidBody & | body1, |
btRigidBody & | body2, | ||
const btSolverConstraint & | contactConstraint | ||
) | [protected] |
void btSequentialImpulseConstraintSolver::resolveSingleConstraintRowLowerLimitSIMD | ( | btRigidBody & | body1, |
btRigidBody & | body2, | ||
const btSolverConstraint & | contactConstraint | ||
) | [protected] |
void btSequentialImpulseConstraintSolver::resolveSplitPenetrationImpulseCacheFriendly | ( | btRigidBody & | body1, |
btRigidBody & | body2, | ||
const btSolverConstraint & | contactConstraint | ||
) | [protected] |
void btSequentialImpulseConstraintSolver::resolveSplitPenetrationSIMD | ( | btRigidBody & | body1, |
btRigidBody & | body2, | ||
const btSolverConstraint & | contactConstraint | ||
) | [protected] |
btScalar btSequentialImpulseConstraintSolver::restitutionCurve | ( | btScalar | rel_vel, |
btScalar | restitution | ||
) | [protected] |
void btSequentialImpulseConstraintSolver::setFrictionConstraintImpulse | ( | btSolverConstraint & | solverConstraint, |
btRigidBody * | rb0, | ||
btRigidBody * | rb1, | ||
btManifoldPoint & | cp, | ||
const btContactSolverInfo & | infoGlobal | ||
) | [protected] |
void btSequentialImpulseConstraintSolver::setRandSeed | ( | unsigned long | seed | ) | [inline] |
Definition at line 111 of file btSequentialImpulseConstraintSolver.h.
void btSequentialImpulseConstraintSolver::setupContactConstraint | ( | btSolverConstraint & | solverConstraint, |
btCollisionObject * | colObj0, | ||
btCollisionObject * | colObj1, | ||
btManifoldPoint & | cp, | ||
const btContactSolverInfo & | infoGlobal, | ||
btVector3 & | vel, | ||
btScalar & | rel_vel, | ||
btScalar & | relaxation, | ||
btVector3 & | rel_pos1, | ||
btVector3 & | rel_pos2 | ||
) | [protected] |
void btSequentialImpulseConstraintSolver::setupFrictionConstraint | ( | btSolverConstraint & | solverConstraint, |
const btVector3 & | normalAxis, | ||
btRigidBody * | solverBodyA, | ||
btRigidBody * | solverBodyIdB, | ||
btManifoldPoint & | cp, | ||
const btVector3 & | rel_pos1, | ||
const btVector3 & | rel_pos2, | ||
btCollisionObject * | colObj0, | ||
btCollisionObject * | colObj1, | ||
btScalar | relaxation, | ||
btScalar | desiredVelocity = 0. , |
||
btScalar | cfmSlip = 0. |
||
) | [protected] |
virtual btScalar btSequentialImpulseConstraintSolver::solveGroup | ( | btCollisionObject ** | bodies, |
int | numBodies, | ||
btPersistentManifold ** | manifold, | ||
int | numManifolds, | ||
btTypedConstraint ** | constraints, | ||
int | numConstraints, | ||
const btContactSolverInfo & | info, | ||
btIDebugDraw * | debugDrawer, | ||
btStackAlloc * | stackAlloc, | ||
btDispatcher * | dispatcher | ||
) | [virtual] |
solve a group of constraints
Implements btConstraintSolver.
virtual btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyFinish | ( | btCollisionObject ** | bodies, |
int | numBodies, | ||
btPersistentManifold ** | manifoldPtr, | ||
int | numManifolds, | ||
btTypedConstraint ** | constraints, | ||
int | numConstraints, | ||
const btContactSolverInfo & | infoGlobal, | ||
btIDebugDraw * | debugDrawer, | ||
btStackAlloc * | stackAlloc | ||
) | [protected, virtual] |
virtual btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyIterations | ( | btCollisionObject ** | bodies, |
int | numBodies, | ||
btPersistentManifold ** | manifoldPtr, | ||
int | numManifolds, | ||
btTypedConstraint ** | constraints, | ||
int | numConstraints, | ||
const btContactSolverInfo & | infoGlobal, | ||
btIDebugDraw * | debugDrawer, | ||
btStackAlloc * | stackAlloc | ||
) | [protected, virtual] |
virtual btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup | ( | btCollisionObject ** | bodies, |
int | numBodies, | ||
btPersistentManifold ** | manifoldPtr, | ||
int | numManifolds, | ||
btTypedConstraint ** | constraints, | ||
int | numConstraints, | ||
const btContactSolverInfo & | infoGlobal, | ||
btIDebugDraw * | debugDrawer, | ||
btStackAlloc * | stackAlloc | ||
) | [protected, virtual] |
virtual void btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySplitImpulseIterations | ( | btCollisionObject ** | bodies, |
int | numBodies, | ||
btPersistentManifold ** | manifoldPtr, | ||
int | numManifolds, | ||
btTypedConstraint ** | constraints, | ||
int | numConstraints, | ||
const btContactSolverInfo & | infoGlobal, | ||
btIDebugDraw * | debugDrawer, | ||
btStackAlloc * | stackAlloc | ||
) | [protected, virtual] |
btScalar btSequentialImpulseConstraintSolver::solveSingleIteration | ( | int | iteration, |
btCollisionObject ** | bodies, | ||
int | numBodies, | ||
btPersistentManifold ** | manifoldPtr, | ||
int | numManifolds, | ||
btTypedConstraint ** | constraints, | ||
int | numConstraints, | ||
const btContactSolverInfo & | infoGlobal, | ||
btIDebugDraw * | debugDrawer, | ||
btStackAlloc * | stackAlloc | ||
) | [protected] |
unsigned long btSequentialImpulseConstraintSolver::m_btSeed2 [protected] |
m_btSeed2 is used for re-arranging the constraint rows. improves convergence/quality of friction
Definition at line 54 of file btSequentialImpulseConstraintSolver.h.
btAlignedObjectArray<int> btSequentialImpulseConstraintSolver::m_orderFrictionConstraintPool [protected] |
Definition at line 36 of file btSequentialImpulseConstraintSolver.h.
Definition at line 35 of file btSequentialImpulseConstraintSolver.h.
btAlignedObjectArray<btTypedConstraint::btConstraintInfo1> btSequentialImpulseConstraintSolver::m_tmpConstraintSizesPool [protected] |
Definition at line 37 of file btSequentialImpulseConstraintSolver.h.
Definition at line 32 of file btSequentialImpulseConstraintSolver.h.
btConstraintArray btSequentialImpulseConstraintSolver::m_tmpSolverContactFrictionConstraintPool [protected] |
Definition at line 34 of file btSequentialImpulseConstraintSolver.h.
btConstraintArray btSequentialImpulseConstraintSolver::m_tmpSolverNonContactConstraintPool [protected] |
Definition at line 33 of file btSequentialImpulseConstraintSolver.h.