99 setupContactConstraint(contactConstraint, solverBodyIdA, solverBodyIdB, cp, infoGlobal, relaxation, rel_pos1, rel_pos2);
103 if (rollingFrictionIndex >= 0)
130 if (axis[1].length2() > axis[0].length2())
134 const btScalar kRollingFrictionThreshold = 0.001f;
135 for (
int i = 0; i < 2; ++i)
137 int iRollingFric = rollingFrictionIndex + 1 + i;
141 if (dir.
length() > kRollingFrictionThreshold)
201 setupFrictionConstraint(*frictionConstraint1, cp.
m_lateralFrictionDir1, solverBodyIdA, solverBodyIdB, cp, rel_pos1, rel_pos2, colObj0, colObj1, relaxation, infoGlobal);
203 if (frictionConstraint2)
209 setupFrictionConstraint(*frictionConstraint2, cp.
m_lateralFrictionDir2, solverBodyIdA, solverBodyIdB, cp, rel_pos1, rel_pos2, colObj0, colObj1, relaxation, infoGlobal);
218 setupFrictionConstraint(*frictionConstraint1, cp.
m_lateralFrictionDir1, solverBodyIdA, solverBodyIdB, cp, rel_pos1, rel_pos2, colObj0, colObj1, relaxation, infoGlobal);
220 if (frictionConstraint2)
224 setupFrictionConstraint(*frictionConstraint2, cp.
m_lateralFrictionDir2, solverBodyIdA, solverBodyIdB, cp, rel_pos1, rel_pos2, colObj0, colObj1, relaxation, infoGlobal);
235 setupFrictionConstraint(*frictionConstraint1, cp.
m_lateralFrictionDir1, solverBodyIdA, solverBodyIdB, cp, rel_pos1, rel_pos2, colObj0, colObj1, relaxation, infoGlobal, cp.
m_contactMotion1, cp.
m_frictionCFM);
236 if (frictionConstraint2)
238 setupFrictionConstraint(*frictionConstraint2, cp.
m_lateralFrictionDir2, solverBodyIdA, solverBodyIdB, cp, rel_pos1, rel_pos2, colObj0, colObj1, relaxation, infoGlobal, cp.
m_contactMotion2, cp.
m_frictionCFM);
261 for (
int iBatch = iBegin; iBatch < iEnd; ++iBatch)
264 for (
int i = batch.
begin; i < batch.
end; ++i)
280 for (
int iiPhase = 0; iiPhase < batchedCons.
m_phases.size(); ++iiPhase)
304 int solverBodyId = -1;
311 if (solverBodyId < 0)
316 if (solverBodyId < 0)
336 const int INVALID_SOLVER_BODY_ID = -1;
349 if (INVALID_SOLVER_BODY_ID == solverBodyId)
356 if (INVALID_SOLVER_BODY_ID == solverBodyId)
391 BT_PROFILE(
"internalCollectContactManifoldCachedInfo");
392 for (
int i = 0; i < numManifolds; ++i)
452 BT_PROFILE(
"internalAllocContactConstraints");
454 for (
int iManifold = 0; iManifold < numManifolds; ++iManifold)
481 for (
int i = 0; i < 3; i++)
484 rollingFrictionIndex++;
534 int numRollingFrictionConstraints = 0;
535 for (
int iManifold = 0; iManifold < numManifolds; ++iManifold)
545 numRollingFrictionConstraints += 3;
554 int extraReserve = numContacts / 16;
581 if (numManifolds > 0)
601 for (
int i = iBegin; i < iEnd; i++)
646 for (
int i = iBegin; i < iEnd; ++i)
648 const JointParams& jointParams = jointParamsArray[i];
650 if (currentRow != -1)
694 bool parallelJointSetup =
true;
696 if (parallelJointSetup)
707 int totalNumRows = 0;
712 for (
int i = 0; i < numConstraints; i++)
734 if (parallelJointSetup)
750 for (
int i = iBegin; i < iEnd; i++)
815 bool parallelBodySetup =
true;
816 if (parallelBodySetup)
860 btScalar leastSquaresResidual = 0.f;
861 for (
int iiCons = batchBegin; iiCons < batchEnd; ++iiCons)
863 int iCons = consIndices[iiCons];
868 leastSquaresResidual += residual * residual;
870 return leastSquaresResidual;
885 BT_PROFILE(
"ContactSplitPenetrationImpulseSolverLoop");
887 for (
int iBatch = iBegin; iBatch < iEnd; ++iBatch)
898 BT_PROFILE(
"solveGroupCacheFriendlySplitImpulseIterations");
901 for (
int iteration = 0; iteration < infoGlobal.
m_numIterations; iteration++)
903 btScalar leastSquaresResidual = 0.f;
908 btScalar leastSquaresResidual = 0.f;
909 for (
int iiPhase = 0; iiPhase < batchedCons.
m_phases.size(); ++iiPhase)
922 if (leastSquaresResidual <= infoGlobal.m_leastSquaresResidualThreshold || iteration >= (infoGlobal.
m_numIterations - 1))
924#ifdef VERBOSE_RESIDUAL_PRINTF
925 printf(
"residual = %f at iteration #%d\n", leastSquaresResidual, iteration);
940 btScalar leastSquaresResidual = 0.f;
960 for (
int j = 0; j < numConstraints; j++)
962 if (constraints[j]->isEnabled())
992 return leastSquaresResidual;
997 btScalar leastSquaresResidual = 0.f;
998 for (
int iiCons = batchBegin; iiCons < batchEnd; ++iiCons)
1000 int iCons = consIndices[iiCons];
1007 leastSquaresResidual += residual * residual;
1010 return leastSquaresResidual;
1015 btScalar leastSquaresResidual = 0.f;
1016 for (
int iiCons = batchBegin; iiCons < batchEnd; ++iiCons)
1018 int iCons = consIndices[iiCons];
1023 leastSquaresResidual += residual * residual;
1025 return leastSquaresResidual;
1030 btScalar leastSquaresResidual = 0.f;
1031 for (
int iiCons = batchBegin; iiCons < batchEnd; ++iiCons)
1033 int iContact = consIndices[iiCons];
1037 if (totalImpulse > 0.0f)
1041 for (
int iFriction = iBegin; iFriction < iEnd; ++iFriction)
1052 leastSquaresResidual += residual * residual;
1056 return leastSquaresResidual;
1061 btScalar leastSquaresResidual = 0.f;
1062 for (
int iiCons = batchBegin; iiCons < batchEnd; ++iiCons)
1064 int iContact = consIndices[iiCons];
1066 if (iFirstRollingFriction >= 0)
1070 if (totalImpulse > 0.0f)
1072 int iBegin = iFirstRollingFriction;
1073 int iEnd = iBegin + 3;
1074 for (
int iRollingFric = iBegin; iRollingFric < iEnd; ++iRollingFric)
1081 btScalar rollingFrictionMagnitude = rollingFrictionConstraint.
m_friction * totalImpulse;
1082 if (rollingFrictionMagnitude > rollingFrictionConstraint.
m_friction)
1084 rollingFrictionMagnitude = rollingFrictionConstraint.
m_friction;
1087 rollingFrictionConstraint.
m_lowerLimit = -rollingFrictionMagnitude;
1088 rollingFrictionConstraint.
m_upperLimit = rollingFrictionMagnitude;
1091 leastSquaresResidual += residual * residual;
1096 return leastSquaresResidual;
1103 btScalar leastSquaresResidual = 0.f;
1106 for (
int iiCons = batchBegin; iiCons < batchEnd; iiCons++)
1109 int iContact = contactIndices[iiCons];
1114 leastSquaresResidual += residual * residual;
1119 if (totalImpulse > 0.0f)
1123 for (
int iFriction = iBegin; iFriction < iEnd; ++iFriction)
1134 leastSquaresResidual += residual * residual;
1140 if (totalImpulse > 0.0f && iFirstRollingFriction >= 0)
1142 int iBegin = iFirstRollingFriction;
1143 int iEnd = iBegin + 3;
1144 for (
int iRollingFric = iBegin; iRollingFric < iEnd; ++iRollingFric)
1151 btScalar rollingFrictionMagnitude = rollingFrictionConstraint.
m_friction * totalImpulse;
1152 if (rollingFrictionMagnitude > rollingFrictionConstraint.
m_friction)
1154 rollingFrictionMagnitude = rollingFrictionConstraint.
m_friction;
1157 rollingFrictionConstraint.
m_lowerLimit = -rollingFrictionMagnitude;
1158 rollingFrictionConstraint.
m_upperLimit = rollingFrictionMagnitude;
1161 leastSquaresResidual += residual * residual;
1165 return leastSquaresResidual;
1179 for (
int iBatch = 0; iBatch < bc.
m_batches.size(); ++iBatch)
1183 for (
int iiCons = batch.
begin; iiCons < batch.
end; ++iiCons)
1198 if (iteration < numIterations)
1220 for (
int iBatch = iBegin; iBatch < iEnd; ++iBatch)
1234 btScalar leastSquaresResidual = 0.f;
1235 for (
int iiPhase = 0; iiPhase < batchedCons.
m_phases.size(); ++iiPhase)
1242 return leastSquaresResidual;
1259 for (
int iBatch = iBegin; iBatch < iEnd; ++iBatch)
1273 btScalar leastSquaresResidual = 0.f;
1274 for (
int iiPhase = 0; iiPhase < batchedCons.
m_phases.size(); ++iiPhase)
1281 return leastSquaresResidual;
1298 for (
int iBatch = iBegin; iBatch < iEnd; ++iBatch)
1309 BT_PROFILE(
"resolveAllContactFrictionConstraints");
1312 btScalar leastSquaresResidual = 0.f;
1313 for (
int iiPhase = 0; iiPhase < batchedCons.
m_phases.size(); ++iiPhase)
1320 return leastSquaresResidual;
1337 for (
int iBatch = iBegin; iBatch < iEnd; ++iBatch)
1348 BT_PROFILE(
"resolveAllContactConstraintsInterleaved");
1351 btScalar leastSquaresResidual = 0.f;
1352 for (
int iiPhase = 0; iiPhase < batchedCons.
m_phases.size(); ++iiPhase)
1359 return leastSquaresResidual;
1376 for (
int iBatch = iBegin; iBatch < iEnd; ++iBatch)
1387 BT_PROFILE(
"resolveAllRollingFrictionConstraints");
1388 btScalar leastSquaresResidual = 0.f;
1411 btScalar leastSquaresResidual = 0.f;
1412 for (
int iiPhase = 0; iiPhase < batchedCons.
m_phases.size(); ++iiPhase)
1423 for (
int j = 0; j < numRollingFrictionPoolConstraints; j++)
1429 if (totalImpulse > 0.0f)
1431 btScalar rollingFrictionMagnitude = rollingFrictionConstraint.
m_friction * totalImpulse;
1432 if (rollingFrictionMagnitude > rollingFrictionConstraint.
m_friction)
1433 rollingFrictionMagnitude = rollingFrictionConstraint.
m_friction;
1435 rollingFrictionConstraint.
m_lowerLimit = -rollingFrictionMagnitude;
1436 rollingFrictionConstraint.
m_upperLimit = rollingFrictionMagnitude;
1439 leastSquaresResidual += residual * residual;
1444 return leastSquaresResidual;
1532 int grainSize = 500;
1538 int grainSize = 400;
1543 int grainSize = 100;
@ BT_CONTACT_FLAG_LATERAL_FRICTION_INITIALIZED
@ BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_BODY
@ BT_ENABLE_GYROSCOPIC_FORCE_EXPLICIT
BT_ENABLE_GYROPSCOPIC_FORCE flags is enabled by default in Bullet 2.83 and onwards.
@ BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_WORLD
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btScalar btSqrt(btScalar y)
static T sum(const btAlignedObjectArray< T > &items)
btScalar btParallelSum(int iBegin, int iEnd, int grainSize, const btIParallelSumBody &body)
bool btThreadsAreRunning()
void btParallelFor(int iBegin, int iEnd, int grainSize, const btIParallelForBody &body)
void btPlaneSpace1(const T &n, T &p, T &q)
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
void resizeNoInitialize(int newsize)
resize changes the number of elements in the array.
int size() const
return the number of elements in the array
void resize(int newsize, const T &fillData=T())
void swap(int index0, int index1)
T & expand(const T &fillValue=T())
int capacity() const
return the pre-allocated (reserved) elements, this is at least as large as the total number of elemen...
btCollisionObject can be used to manage collision detection objects.
bool isStaticOrKinematicObject() const
int getWorldArrayIndex() const
void setCompanionId(int id)
bool isKinematicObject() const
@ CF_ANISOTROPIC_ROLLING_FRICTION
@ CF_ANISOTROPIC_FRICTION
int getCompanionId() const
The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations.
ManifoldContactPoint collects and maintains persistent contactpoints.
btScalar m_combinedSpinningFriction
btScalar m_combinedRollingFriction
btScalar getDistance() const
btVector3 m_lateralFrictionDir2
const btVector3 & getPositionWorldOnB() const
const btVector3 & getPositionWorldOnA() const
btVector3 m_normalWorldOnB
btScalar m_contactMotion2
btVector3 m_lateralFrictionDir1
btScalar m_contactMotion1
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
const btManifoldPoint & getContactPoint(int index) const
const btCollisionObject * getBody0() const
const btCollisionObject * getBody1() const
int getNumContacts() const
btScalar getContactProcessingThreshold() const
The btRigidBody is the main class for rigid body objects.
btScalar getInvMass() const
btVector3 computeGyroscopicImpulseImplicit_World(btScalar dt) const
perform implicit force computation in world space
btVector3 computeGyroscopicImpulseImplicit_Body(btScalar step) const
perform implicit force computation in body space (inertial frame)
static const btRigidBody * upcast(const btCollisionObject *colObj)
to keep collision detection and dynamics separate we don't store a rigidbody pointer but a rigidbody ...
const btMatrix3x3 & getInvInertiaTensorWorld() const
btVector3 computeGyroscopicForceExplicit(btScalar maxGyroscopicForce) const
explicit version is best avoided, it gains energy
btSequentialImpulseConstraintSolverMt
virtual void setupBatchedContactConstraints()
void internalCollectContactManifoldCachedInfo(btContactManifoldCachedInfo *cachedInfoArray, btPersistentManifold **manifoldPtr, int numManifolds, const btContactSolverInfo &infoGlobal)
virtual btScalar resolveAllRollingFrictionConstraints()
void internalWriteBackBodies(int iBegin, int iEnd, const btContactSolverInfo &infoGlobal)
void internalAllocContactConstraints(const btContactManifoldCachedInfo *cachedInfoArray, int numManifolds)
void internalConvertMultipleJoints(const btAlignedObjectArray< JointParams > &jointParamsArray, btTypedConstraint **constraints, int iBegin, int iEnd, const btContactSolverInfo &infoGlobal)
btBatchedConstraints m_batchedJointConstraints
btSpinMutex m_kinematicBodyUniqueIdToSolverBodyTableMutex
btSequentialImpulseConstraintSolverMt()
virtual btScalar resolveAllJointConstraints(int iteration)
void internalWriteBackContacts(int iBegin, int iEnd, const btContactSolverInfo &infoGlobal)
virtual void randomizeConstraintOrdering(int iteration, int numIterations)
btAlignedObjectArray< int > m_rollingFrictionIndexTable
static btBatchedConstraints::BatchingMethod s_contactBatchingMethod
int m_numFrictionDirections
int getOrInitSolverBodyThreadsafe(btCollisionObject &body, btScalar timeStep)
virtual btScalar solveGroupCacheFriendlySetup(btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer) BT_OVERRIDE
virtual void convertBodies(btCollisionObject **bodies, int numBodies, const btContactSolverInfo &infoGlobal) BT_OVERRIDE
virtual void solveGroupCacheFriendlySplitImpulseIterations(btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer) BT_OVERRIDE
btScalar resolveMultipleContactRollingFrictionConstraints(const btAlignedObjectArray< int > &consIndices, int batchBegin, int batchEnd)
btBatchedConstraints m_batchedContactConstraints
btScalar resolveMultipleContactConstraintsInterleaved(const btAlignedObjectArray< int > &contactIndices, int batchBegin, int batchEnd)
virtual void convertJoints(btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal) BT_OVERRIDE
virtual btScalar resolveAllContactFrictionConstraints()
void internalInitMultipleJoints(btTypedConstraint **constraints, int iBegin, int iEnd)
void randomizeBatchedConstraintOrdering(btBatchedConstraints *batchedConstraints)
virtual void setupBatchedJointConstraints()
virtual btScalar solveSingleIteration(int iteration, btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer) BT_OVERRIDE
void internalWriteBackJoints(int iBegin, int iEnd, const btContactSolverInfo &infoGlobal)
void internalSetupContactConstraints(int iContactConstraint, const btContactSolverInfo &infoGlobal)
btScalar resolveMultipleContactSplitPenetrationImpulseConstraints(const btAlignedObjectArray< int > &consIndices, int batchBegin, int batchEnd)
btAlignedObjectArray< char > m_scratchMemory
static bool s_allowNestedParallelForLoops
virtual btScalar resolveAllContactConstraints()
virtual ~btSequentialImpulseConstraintSolverMt()
btScalar resolveMultipleJointConstraints(const btAlignedObjectArray< int > &consIndices, int batchBegin, int batchEnd, int iteration)
void allocAllContactConstraints(btPersistentManifold **manifoldPtr, int numManifolds, const btContactSolverInfo &infoGlobal)
void setupAllContactConstraints(const btContactSolverInfo &infoGlobal)
static int s_minBatchSize
btSpinMutex m_bodySolverArrayMutex
virtual btScalar solveGroupCacheFriendlyFinish(btCollisionObject **bodies, int numBodies, const btContactSolverInfo &infoGlobal) BT_OVERRIDE
virtual btScalar resolveAllContactConstraintsInterleaved()
btScalar resolveMultipleContactFrictionConstraints(const btAlignedObjectArray< int > &consIndices, int batchBegin, int batchEnd)
virtual void convertContacts(btPersistentManifold **manifoldPtr, int numManifolds, const btContactSolverInfo &infoGlobal) BT_OVERRIDE
btScalar resolveMultipleContactConstraints(const btAlignedObjectArray< int > &consIndices, int batchBegin, int batchEnd)
static int s_maxBatchSize
bool m_useObsoleteJointConstraints
void internalConvertBodies(btCollisionObject **bodies, int iBegin, int iEnd, const btContactSolverInfo &infoGlobal)
static int s_minimumContactManifoldsForBatching
static btBatchedConstraints::BatchingMethod s_jointBatchingMethod
void initSolverBody(btSolverBody *solverBody, btCollisionObject *collisionObject, btScalar timeStep)
btConstraintArray m_tmpSolverContactConstraintPool
void writeBackJoints(int iBegin, int iEnd, const btContactSolverInfo &infoGlobal)
btConstraintArray m_tmpSolverContactFrictionConstraintPool
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 convertContacts(btPersistentManifold **manifoldPtr, int numManifolds, const btContactSolverInfo &infoGlobal)
btScalar resolveSingleConstraintRowLowerLimit(btSolverBody &bodyA, btSolverBody &bodyB, const btSolverConstraint &contactConstraint)
static void applyAnisotropicFriction(btCollisionObject *colObj, btVector3 &frictionDirection, int frictionMode)
btScalar resolveSingleConstraintRowGeneric(btSolverBody &bodyA, btSolverBody &bodyB, const btSolverConstraint &contactConstraint)
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.)
btAlignedObjectArray< btSolverBody > m_tmpSolverBodyPool
btAlignedObjectArray< btTypedConstraint::btConstraintInfo1 > m_tmpConstraintSizesPool
btAlignedObjectArray< int > m_orderTmpConstraintPool
void writeBackBodies(int iBegin, int iEnd, const btContactSolverInfo &infoGlobal)
btAlignedObjectArray< int > m_kinematicBodyUniqueIdToSolverBodyTable
virtual btScalar solveGroupCacheFriendlySetup(btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer)
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.)
btConstraintArray m_tmpSolverNonContactConstraintPool
btConstraintArray m_tmpSolverContactRollingFrictionConstraintPool
void setFrictionConstraintImpulse(btSolverConstraint &solverConstraint, int solverBodyIdA, int solverBodyIdB, btManifoldPoint &cp, const btContactSolverInfo &infoGlobal)
int getOrInitSolverBody(btCollisionObject &body, btScalar timeStep)
void writeBackContacts(int iBegin, int iEnd, 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)
btScalar resolveSplitPenetrationImpulse(btSolverBody &bodyA, btSolverBody &bodyB, const btSolverConstraint &contactConstraint)
void setupContactConstraint(btSolverConstraint &solverConstraint, int solverBodyIdA, int solverBodyIdB, btManifoldPoint &cp, const btContactSolverInfo &infoGlobal, btScalar &relaxation, const btVector3 &rel_pos1, const btVector3 &rel_pos2)
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
virtual void buildJacobian()
internal method used by the constraint solver, don't use them directly
void internalSetAppliedImpulse(btScalar appliedImpulse)
internal method used by the constraint solver, don't use them directly
const btRigidBody & getRigidBodyA() const
const btRigidBody & getRigidBodyB() const
virtual void getInfo1(btConstraintInfo1 *info)=0
internal method used by the constraint solver, don't use them directly
const btJointFeedback * getJointFeedback() const
btVector3 can be used to represent 3D points and vectors.
btScalar length() const
Return the length of the vector.
btVector3 cross(const btVector3 &v) const
Return the cross product between this and another vector.
btScalar dot(const btVector3 &v) const
Return the dot product.
btScalar length2() const
Return the length of the vector squared.
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
btSequentialImpulseConstraintSolverMt * m_solver
btCollisionObject ** m_bodies
void forLoop(int iBegin, int iEnd) const BT_OVERRIDE
ConvertBodiesLoop(btSequentialImpulseConstraintSolverMt *solver, btCollisionObject **bodies, int numBodies, const btContactSolverInfo &infoGlobal)
const btContactSolverInfo & m_infoGlobal
btSequentialImpulseConstraintSolverMt * m_solver
const btContactSolverInfo & m_infoGlobal
btTypedConstraint ** m_srcConstraints
const btAlignedObjectArray< btSequentialImpulseConstraintSolverMt::JointParams > & m_jointParamsArray
void forLoop(int iBegin, int iEnd) const BT_OVERRIDE
ConvertJointsLoop(btSequentialImpulseConstraintSolverMt *solver, const btAlignedObjectArray< btSequentialImpulseConstraintSolverMt::JointParams > &jointParamsArray, btTypedConstraint **srcConstraints, const btContactSolverInfo &infoGlobal)
btTypedConstraint ** m_constraints
void forLoop(int iBegin, int iEnd) const BT_OVERRIDE
InitJointsLoop(btSequentialImpulseConstraintSolverMt *solver, btTypedConstraint **constraints)
btSequentialImpulseConstraintSolverMt * m_solver
JointSolverLoop(btSequentialImpulseConstraintSolverMt *solver, const btBatchedConstraints *bc, int iteration)
btScalar sumLoop(int iBegin, int iEnd) const BT_OVERRIDE
btSequentialImpulseConstraintSolverMt * m_solver
const btBatchedConstraints * m_bc
void forLoop(int iBegin, int iEnd) const BT_OVERRIDE
const btContactSolverInfo * m_infoGlobal
WriteBodiesLoop(btSequentialImpulseConstraintSolverMt *solver, const btContactSolverInfo &infoGlobal)
btSequentialImpulseConstraintSolverMt * m_solver
WriteJointsLoop(btSequentialImpulseConstraintSolverMt *solver, const btContactSolverInfo &infoGlobal)
const btContactSolverInfo * m_infoGlobal
void forLoop(int iBegin, int iEnd) const BT_OVERRIDE
btSequentialImpulseConstraintSolverMt * m_solver
btAlignedObjectArray< Range > m_batches
btAlignedObjectArray< int > m_constraintIndices
void setup(btConstraintArray *constraints, const btAlignedObjectArray< btSolverBody > &bodies, BatchingMethod batchingMethod, int minBatchSize, int maxBatchSize, btAlignedObjectArray< char > *scratchMemory)
btAlignedObjectArray< char > m_phaseGrainSize
btAlignedObjectArray< int > m_phaseOrder
btAlignedObjectArray< Range > m_phases
btIDebugDraw * m_debugDrawer
@ BATCHING_METHOD_SPATIAL_GRID_2D
btVector3 m_appliedForceBodyA
btVector3 m_appliedTorqueBodyA
btVector3 m_appliedForceBodyB
btVector3 m_appliedTorqueBodyB
The btSolverBody is an internal datastructure for the constraint solver. Only necessary data is packe...
btRigidBody * m_originalBody
void getVelocityInLocalPointNoDelta(const btVector3 &rel_pos, btVector3 &velocity) const
btVector3 m_externalTorqueImpulse
const btTransform & getWorldTransform() const
1D constraint along a normal axis between bodyA and bodyB. It can be combined to solve contact and fr...
void * m_originalContactPoint
btSimdScalar m_appliedImpulse
int m_overrideNumSolverIterations