45 for (
int j = 0; j < numNonContactPool; ++j)
56 for (
int j = 0; j < numConstraintPool; ++j)
64 for (
int j = 0; j < numFrictionPool; ++j)
84 deltaflengthsqr += deltaf * deltaf;
128 for (
int j = 0; j < numConstraints; j++)
130 if (constraints[j]->isEnabled())
146 for (
int c = 0; c < numPoolConstraints; c++)
154 deltaflengthsqr += deltaf * deltaf;
157 bool applyFriction =
true;
169 deltaflengthsqr += deltaf * deltaf;
187 deltaflengthsqr += deltaf * deltaf;
203 for (j = 0; j < numPoolConstraints; j++)
208 deltaflengthsqr += deltaf * deltaf;
214 for (j = 0; j < numFrictionPoolConstraints; j++)
226 deltaflengthsqr += deltaf * deltaf;
237 for (
int j = 0; j < numRollingFrictionPoolConstraints; j++)
243 btScalar rollingFrictionMagnitude = rollingFrictionConstraint.
m_friction * totalImpulse;
244 if (rollingFrictionMagnitude > rollingFrictionConstraint.
m_friction)
245 rollingFrictionMagnitude = rollingFrictionConstraint.
m_friction;
247 rollingFrictionConstraint.
m_lowerLimit = -rollingFrictionMagnitude;
248 rollingFrictionConstraint.
m_upperLimit = rollingFrictionMagnitude;
252 deltaflengthsqr += deltaf * deltaf;
352 return deltaflengthsqr;
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
void resizeNoInitialize(int newsize)
resize changes the number of elements in the array.
int size() const
return the number of elements in the array
btCollisionObject can be used to manage collision detection objects.
The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations.
virtual btScalar solveSingleIteration(int iteration, btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer)
btAlignedObjectArray< btScalar > m_pCF
virtual btScalar solveGroupCacheFriendlyFinish(btCollisionObject **bodies, int numBodies, const btContactSolverInfo &infoGlobal)
btAlignedObjectArray< btScalar > m_deltafCF
btScalar m_deltafLengthSqrPrev
btAlignedObjectArray< btScalar > m_deltafC
btAlignedObjectArray< btScalar > m_deltafNC
btAlignedObjectArray< btScalar > m_deltafCRF
virtual btScalar solveGroupCacheFriendlySetup(btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer)
btAlignedObjectArray< btScalar > m_pCRF
btAlignedObjectArray< btScalar > m_pC
bool m_onlyForNoneContact
btAlignedObjectArray< btScalar > m_pNC
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
btConstraintArray m_tmpSolverContactConstraintPool
btConstraintArray m_tmpSolverContactFrictionConstraintPool
virtual btScalar solveGroupCacheFriendlyFinish(btCollisionObject **bodies, int numBodies, const btContactSolverInfo &infoGlobal)
btAlignedObjectArray< int > m_orderFrictionConstraintPool
btScalar resolveSingleConstraintRowLowerLimit(btSolverBody &bodyA, btSolverBody &bodyB, const btSolverConstraint &contactConstraint)
btScalar resolveSingleConstraintRowGeneric(btSolverBody &bodyA, btSolverBody &bodyB, const btSolverConstraint &contactConstraint)
btAlignedObjectArray< btSolverBody > m_tmpSolverBodyPool
btAlignedObjectArray< int > m_orderTmpConstraintPool
btAlignedObjectArray< int > m_orderNonContactConstraintPool
virtual btScalar solveGroupCacheFriendlySetup(btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer)
btConstraintArray m_tmpSolverNonContactConstraintPool
btConstraintArray m_tmpSolverContactRollingFrictionConstraintPool
int getOrInitSolverBody(btCollisionObject &body, btScalar timeStep)
TypedConstraint is the baseclass for Bullet constraints and vehicles.
virtual void solveConstraintObsolete(btSolverBody &, btSolverBody &, btScalar)
internal method used by the constraint solver, don't use them directly
The btSolverBody is an internal datastructure for the constraint solver. Only necessary data is packe...
void internalApplyImpulse(const btVector3 &linearComponent, const btVector3 &angularComponent, const btScalar impulseMagnitude)
const btVector3 & internalGetInvMass() const
1D constraint along a normal axis between bodyA and bodyB. It can be combined to solve contact and fr...
btVector3 m_contactNormal2
btVector3 m_angularComponentB
btSimdScalar m_appliedImpulse
int m_overrideNumSolverIterations
btVector3 m_angularComponentA
btVector3 m_contactNormal1