Bullet Collision Detection & Physics Library: btNNCGConstraintSolver.cpp Source File

Bullet Collision Detection & Physics Library

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

btNNCGConstraintSolver.cpp
Go to the documentation of this file.
1/*
2Bullet Continuous Collision Detection and Physics Library
3Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org
4
5This software is provided 'as-is', without any express or implied warranty.
6In no event will the authors be held liable for any damages arising from the use of this software.
7Permission is granted to anyone to use this software for any purpose,
8including commercial applications, and to alter it and redistribute it freely,
9subject to the following restrictions:
10
111. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
122. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
133. This notice may not be removed or altered from any source distribution.
14*/
15
16#include "btNNCGConstraintSolver.h"
17
18 btScalar btNNCGConstraintSolver::solveGroupCacheFriendlySetup(btCollisionObject** bodies, int numBodies, btPersistentManifold** manifoldPtr, int numManifolds, btTypedConstraint** constraints, int numConstraints, const btContactSolverInfo& infoGlobal, btIDebugDraw* debugDrawer)
19{
20 btScalar val = btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(bodies, numBodies, manifoldPtr, numManifolds, constraints, numConstraints, infoGlobal, debugDrawer);
21
22 m_pNC.resizeNoInitialize(m_tmpSolverNonContactConstraintPool.size());
23 m_pC.resizeNoInitialize(m_tmpSolverContactConstraintPool.size());
24 m_pCF.resizeNoInitialize(m_tmpSolverContactFrictionConstraintPool.size());
25 m_pCRF.resizeNoInitialize(m_tmpSolverContactRollingFrictionConstraintPool.size());
26
27 m_deltafNC.resizeNoInitialize(m_tmpSolverNonContactConstraintPool.size());
28 m_deltafC.resizeNoInitialize(m_tmpSolverContactConstraintPool.size());
29 m_deltafCF.resizeNoInitialize(m_tmpSolverContactFrictionConstraintPool.size());
30 m_deltafCRF.resizeNoInitialize(m_tmpSolverContactRollingFrictionConstraintPool.size());
31
32 return val;
33}
34
35 btScalar btNNCGConstraintSolver::solveSingleIteration(int iteration, btCollisionObject** /*bodies */, int /*numBodies*/, btPersistentManifold** /*manifoldPtr*/, int /*numManifolds*/, btTypedConstraint** constraints, int numConstraints, const btContactSolverInfo& infoGlobal, btIDebugDraw* /*debugDrawer*/)
36{
37 int numNonContactPool = m_tmpSolverNonContactConstraintPool.size();
38 int numConstraintPool = m_tmpSolverContactConstraintPool.size();
39 int numFrictionPool = m_tmpSolverContactFrictionConstraintPool.size();
40
41 if (infoGlobal.m_solverMode & SOLVER_RANDMIZE_ORDER)
42 {
43 if (1) // uncomment this for a bit less random ((iteration & 7) == 0)
44 {
45 for (int j = 0; j < numNonContactPool; ++j)
46 {
47 int tmp = m_orderNonContactConstraintPool[j];
48 int swapi = btRandInt2(j + 1);
49 m_orderNonContactConstraintPool[j] = m_orderNonContactConstraintPool[swapi];
50 m_orderNonContactConstraintPool[swapi] = tmp;
51 }
52
53 //contact/friction constraints are not solved more than
54 if (iteration < infoGlobal.m_numIterations)
55 {
56 for (int j = 0; j < numConstraintPool; ++j)
57 {
58 int tmp = m_orderTmpConstraintPool[j];
59 int swapi = btRandInt2(j + 1);
60 m_orderTmpConstraintPool[j] = m_orderTmpConstraintPool[swapi];
61 m_orderTmpConstraintPool[swapi] = tmp;
62 }
63
64 for (int j = 0; j < numFrictionPool; ++j)
65 {
66 int tmp = m_orderFrictionConstraintPool[j];
67 int swapi = btRandInt2(j + 1);
68 m_orderFrictionConstraintPool[j] = m_orderFrictionConstraintPool[swapi];
69 m_orderFrictionConstraintPool[swapi] = tmp;
70 }
71 }
72 }
73 }
74
75 btScalar deltaflengthsqr = 0;
76 {
77 for (int j = 0; j < m_tmpSolverNonContactConstraintPool.size(); j++)
78 {
79 btSolverConstraint& constraint = m_tmpSolverNonContactConstraintPool[m_orderNonContactConstraintPool[j]];
80 if (iteration < constraint.m_overrideNumSolverIterations)
81 {
82 btScalar deltaf = resolveSingleConstraintRowGeneric(m_tmpSolverBodyPool[constraint.m_solverBodyIdA], m_tmpSolverBodyPool[constraint.m_solverBodyIdB], constraint);
83 m_deltafNC[j] = deltaf;
84 deltaflengthsqr += deltaf * deltaf;
85 }
86 }
87 }
88
89 if (m_onlyForNoneContact)
90 {
91 if (iteration == 0)
92 {
93 for (int j = 0; j < m_tmpSolverNonContactConstraintPool.size(); j++) m_pNC[j] = m_deltafNC[j];
94 }
95 else
96 {
97 // deltaflengthsqrprev can be 0 only if the solver solved the problem exactly in the previous iteration. In this case we should have quit, but mainly for debug reason with this 'hack' it is now allowed to continue the calculation
98 btScalar beta = m_deltafLengthSqrPrev > 0 ? deltaflengthsqr / m_deltafLengthSqrPrev : 2;
99 if (beta > 1)
100 {
101 for (int j = 0; j < m_tmpSolverNonContactConstraintPool.size(); j++) m_pNC[j] = 0;
102 }
103 else
104 {
105 for (int j = 0; j < m_tmpSolverNonContactConstraintPool.size(); j++)
106 {
107 btSolverConstraint& constraint = m_tmpSolverNonContactConstraintPool[m_orderNonContactConstraintPool[j]];
108 if (iteration < constraint.m_overrideNumSolverIterations)
109 {
110 btScalar additionaldeltaimpulse = beta * m_pNC[j];
111 constraint.m_appliedImpulse = btScalar(constraint.m_appliedImpulse) + additionaldeltaimpulse;
112 m_pNC[j] = beta * m_pNC[j] + m_deltafNC[j];
113 btSolverBody& body1 = m_tmpSolverBodyPool[constraint.m_solverBodyIdA];
114 btSolverBody& body2 = m_tmpSolverBodyPool[constraint.m_solverBodyIdB];
115 const btSolverConstraint& c = constraint;
116 body1.internalApplyImpulse(c.m_contactNormal1 * body1.internalGetInvMass(), c.m_angularComponentA, additionaldeltaimpulse);
117 body2.internalApplyImpulse(c.m_contactNormal2 * body2.internalGetInvMass(), c.m_angularComponentB, additionaldeltaimpulse);
118 }
119 }
120 }
121 }
122 m_deltafLengthSqrPrev = deltaflengthsqr;
123 }
124
125 {
126 if (iteration < infoGlobal.m_numIterations)
127 {
128 for (int j = 0; j < numConstraints; j++)
129 {
130 if (constraints[j]->isEnabled())
131 {
132 int bodyAid = getOrInitSolverBody(constraints[j]->getRigidBodyA(), infoGlobal.m_timeStep);
133 int bodyBid = getOrInitSolverBody(constraints[j]->getRigidBodyB(), infoGlobal.m_timeStep);
134 btSolverBody& bodyA = m_tmpSolverBodyPool[bodyAid];
135 btSolverBody& bodyB = m_tmpSolverBodyPool[bodyBid];
136 constraints[j]->solveConstraintObsolete(bodyA, bodyB, infoGlobal.m_timeStep);
137 }
138 }
139
141 if (infoGlobal.m_solverMode & SOLVER_INTERLEAVE_CONTACT_AND_FRICTION_CONSTRAINTS)
142 {
143 int numPoolConstraints = m_tmpSolverContactConstraintPool.size();
144 int multiplier = (infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS) ? 2 : 1;
145
146 for (int c = 0; c < numPoolConstraints; c++)
147 {
148 btScalar totalImpulse = 0;
149
150 {
151 const btSolverConstraint& solveManifold = m_tmpSolverContactConstraintPool[m_orderTmpConstraintPool[c]];
152 btScalar deltaf = resolveSingleConstraintRowLowerLimit(m_tmpSolverBodyPool[solveManifold.m_solverBodyIdA], m_tmpSolverBodyPool[solveManifold.m_solverBodyIdB], solveManifold);
153 m_deltafC[c] = deltaf;
154 deltaflengthsqr += deltaf * deltaf;
155 totalImpulse = solveManifold.m_appliedImpulse;
156 }
157 bool applyFriction = true;
158 if (applyFriction)
159 {
160 {
161 btSolverConstraint& solveManifold = m_tmpSolverContactFrictionConstraintPool[m_orderFrictionConstraintPool[c * multiplier]];
162
163 if (totalImpulse > btScalar(0))
164 {
165 solveManifold.m_lowerLimit = -(solveManifold.m_friction * totalImpulse);
166 solveManifold.m_upperLimit = solveManifold.m_friction * totalImpulse;
167 btScalar deltaf = resolveSingleConstraintRowGeneric(m_tmpSolverBodyPool[solveManifold.m_solverBodyIdA], m_tmpSolverBodyPool[solveManifold.m_solverBodyIdB], solveManifold);
168 m_deltafCF[c * multiplier] = deltaf;
169 deltaflengthsqr += deltaf * deltaf;
170 }
171 else
172 {
173 m_deltafCF[c * multiplier] = 0;
174 }
175 }
176
177 if (infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS)
178 {
179 btSolverConstraint& solveManifold = m_tmpSolverContactFrictionConstraintPool[m_orderFrictionConstraintPool[c * multiplier + 1]];
180
181 if (totalImpulse > btScalar(0))
182 {
183 solveManifold.m_lowerLimit = -(solveManifold.m_friction * totalImpulse);
184 solveManifold.m_upperLimit = solveManifold.m_friction * totalImpulse;
185 btScalar deltaf = resolveSingleConstraintRowGeneric(m_tmpSolverBodyPool[solveManifold.m_solverBodyIdA], m_tmpSolverBodyPool[solveManifold.m_solverBodyIdB], solveManifold);
186 m_deltafCF[c * multiplier + 1] = deltaf;
187 deltaflengthsqr += deltaf * deltaf;
188 }
189 else
190 {
191 m_deltafCF[c * multiplier + 1] = 0;
192 }
193 }
194 }
195 }
196 }
197 else //SOLVER_INTERLEAVE_CONTACT_AND_FRICTION_CONSTRAINTS
198 {
199 //solve the friction constraints after all contact constraints, don't interleave them
200 int numPoolConstraints = m_tmpSolverContactConstraintPool.size();
201 int j;
202
203 for (j = 0; j < numPoolConstraints; j++)
204 {
205 const btSolverConstraint& solveManifold = m_tmpSolverContactConstraintPool[m_orderTmpConstraintPool[j]];
206 btScalar deltaf = resolveSingleConstraintRowLowerLimit(m_tmpSolverBodyPool[solveManifold.m_solverBodyIdA], m_tmpSolverBodyPool[solveManifold.m_solverBodyIdB], solveManifold);
207 m_deltafC[j] = deltaf;
208 deltaflengthsqr += deltaf * deltaf;
209 }
210
212
213 int numFrictionPoolConstraints = m_tmpSolverContactFrictionConstraintPool.size();
214 for (j = 0; j < numFrictionPoolConstraints; j++)
215 {
216 btSolverConstraint& solveManifold = m_tmpSolverContactFrictionConstraintPool[m_orderFrictionConstraintPool[j]];
217 btScalar totalImpulse = m_tmpSolverContactConstraintPool[solveManifold.m_frictionIndex].m_appliedImpulse;
218
219 if (totalImpulse > btScalar(0))
220 {
221 solveManifold.m_lowerLimit = -(solveManifold.m_friction * totalImpulse);
222 solveManifold.m_upperLimit = solveManifold.m_friction * totalImpulse;
223
224 btScalar deltaf = resolveSingleConstraintRowGeneric(m_tmpSolverBodyPool[solveManifold.m_solverBodyIdA], m_tmpSolverBodyPool[solveManifold.m_solverBodyIdB], solveManifold);
225 m_deltafCF[j] = deltaf;
226 deltaflengthsqr += deltaf * deltaf;
227 }
228 else
229 {
230 m_deltafCF[j] = 0;
231 }
232 }
233 }
234
235 {
236 int numRollingFrictionPoolConstraints = m_tmpSolverContactRollingFrictionConstraintPool.size();
237 for (int j = 0; j < numRollingFrictionPoolConstraints; j++)
238 {
239 btSolverConstraint& rollingFrictionConstraint = m_tmpSolverContactRollingFrictionConstraintPool[j];
240 btScalar totalImpulse = m_tmpSolverContactConstraintPool[rollingFrictionConstraint.m_frictionIndex].m_appliedImpulse;
241 if (totalImpulse > btScalar(0))
242 {
243 btScalar rollingFrictionMagnitude = rollingFrictionConstraint.m_friction * totalImpulse;
244 if (rollingFrictionMagnitude > rollingFrictionConstraint.m_friction)
245 rollingFrictionMagnitude = rollingFrictionConstraint.m_friction;
246
247 rollingFrictionConstraint.m_lowerLimit = -rollingFrictionMagnitude;
248 rollingFrictionConstraint.m_upperLimit = rollingFrictionMagnitude;
249
250 btScalar deltaf = resolveSingleConstraintRowGeneric(m_tmpSolverBodyPool[rollingFrictionConstraint.m_solverBodyIdA], m_tmpSolverBodyPool[rollingFrictionConstraint.m_solverBodyIdB], rollingFrictionConstraint);
251 m_deltafCRF[j] = deltaf;
252 deltaflengthsqr += deltaf * deltaf;
253 }
254 else
255 {
256 m_deltafCRF[j] = 0;
257 }
258 }
259 }
260 }
261 }
262
263 if (!m_onlyForNoneContact)
264 {
265 if (iteration == 0)
266 {
267 for (int j = 0; j < m_tmpSolverNonContactConstraintPool.size(); j++) m_pNC[j] = m_deltafNC[j];
268 for (int j = 0; j < m_tmpSolverContactConstraintPool.size(); j++) m_pC[j] = m_deltafC[j];
269 for (int j = 0; j < m_tmpSolverContactFrictionConstraintPool.size(); j++) m_pCF[j] = m_deltafCF[j];
270 for (int j = 0; j < m_tmpSolverContactRollingFrictionConstraintPool.size(); j++) m_pCRF[j] = m_deltafCRF[j];
271 }
272 else
273 {
274 // deltaflengthsqrprev can be 0 only if the solver solved the problem exactly in the previous iteration. In this case we should have quit, but mainly for debug reason with this 'hack' it is now allowed to continue the calculation
275 btScalar beta = m_deltafLengthSqrPrev > 0 ? deltaflengthsqr / m_deltafLengthSqrPrev : 2;
276 if (beta > 1)
277 {
278 for (int j = 0; j < m_tmpSolverNonContactConstraintPool.size(); j++) m_pNC[j] = 0;
279 for (int j = 0; j < m_tmpSolverContactConstraintPool.size(); j++) m_pC[j] = 0;
280 for (int j = 0; j < m_tmpSolverContactFrictionConstraintPool.size(); j++) m_pCF[j] = 0;
281 for (int j = 0; j < m_tmpSolverContactRollingFrictionConstraintPool.size(); j++) m_pCRF[j] = 0;
282 }
283 else
284 {
285 for (int j = 0; j < m_tmpSolverNonContactConstraintPool.size(); j++)
286 {
287 btSolverConstraint& constraint = m_tmpSolverNonContactConstraintPool[m_orderNonContactConstraintPool[j]];
288 if (iteration < constraint.m_overrideNumSolverIterations)
289 {
290 btScalar additionaldeltaimpulse = beta * m_pNC[j];
291 constraint.m_appliedImpulse = btScalar(constraint.m_appliedImpulse) + additionaldeltaimpulse;
292 m_pNC[j] = beta * m_pNC[j] + m_deltafNC[j];
293 btSolverBody& body1 = m_tmpSolverBodyPool[constraint.m_solverBodyIdA];
294 btSolverBody& body2 = m_tmpSolverBodyPool[constraint.m_solverBodyIdB];
295 const btSolverConstraint& c = constraint;
296 body1.internalApplyImpulse(c.m_contactNormal1 * body1.internalGetInvMass(), c.m_angularComponentA, additionaldeltaimpulse);
297 body2.internalApplyImpulse(c.m_contactNormal2 * body2.internalGetInvMass(), c.m_angularComponentB, additionaldeltaimpulse);
298 }
299 }
300 for (int j = 0; j < m_tmpSolverContactConstraintPool.size(); j++)
301 {
302 btSolverConstraint& constraint = m_tmpSolverContactConstraintPool[m_orderTmpConstraintPool[j]];
303 if (iteration < infoGlobal.m_numIterations)
304 {
305 btScalar additionaldeltaimpulse = beta * m_pC[j];
306 constraint.m_appliedImpulse = btScalar(constraint.m_appliedImpulse) + additionaldeltaimpulse;
307 m_pC[j] = beta * m_pC[j] + m_deltafC[j];
308 btSolverBody& body1 = m_tmpSolverBodyPool[constraint.m_solverBodyIdA];
309 btSolverBody& body2 = m_tmpSolverBodyPool[constraint.m_solverBodyIdB];
310 const btSolverConstraint& c = constraint;
311 body1.internalApplyImpulse(c.m_contactNormal1 * body1.internalGetInvMass(), c.m_angularComponentA, additionaldeltaimpulse);
312 body2.internalApplyImpulse(c.m_contactNormal2 * body2.internalGetInvMass(), c.m_angularComponentB, additionaldeltaimpulse);
313 }
314 }
315 for (int j = 0; j < m_tmpSolverContactFrictionConstraintPool.size(); j++)
316 {
317 btSolverConstraint& constraint = m_tmpSolverContactFrictionConstraintPool[m_orderFrictionConstraintPool[j]];
318 if (iteration < infoGlobal.m_numIterations)
319 {
320 btScalar additionaldeltaimpulse = beta * m_pCF[j];
321 constraint.m_appliedImpulse = btScalar(constraint.m_appliedImpulse) + additionaldeltaimpulse;
322 m_pCF[j] = beta * m_pCF[j] + m_deltafCF[j];
323 btSolverBody& body1 = m_tmpSolverBodyPool[constraint.m_solverBodyIdA];
324 btSolverBody& body2 = m_tmpSolverBodyPool[constraint.m_solverBodyIdB];
325 const btSolverConstraint& c = constraint;
326 body1.internalApplyImpulse(c.m_contactNormal1 * body1.internalGetInvMass(), c.m_angularComponentA, additionaldeltaimpulse);
327 body2.internalApplyImpulse(c.m_contactNormal2 * body2.internalGetInvMass(), c.m_angularComponentB, additionaldeltaimpulse);
328 }
329 }
330 {
331 for (int j = 0; j < m_tmpSolverContactRollingFrictionConstraintPool.size(); j++)
332 {
333 btSolverConstraint& constraint = m_tmpSolverContactRollingFrictionConstraintPool[j];
334 if (iteration < infoGlobal.m_numIterations)
335 {
336 btScalar additionaldeltaimpulse = beta * m_pCRF[j];
337 constraint.m_appliedImpulse = btScalar(constraint.m_appliedImpulse) + additionaldeltaimpulse;
338 m_pCRF[j] = beta * m_pCRF[j] + m_deltafCRF[j];
339 btSolverBody& body1 = m_tmpSolverBodyPool[constraint.m_solverBodyIdA];
340 btSolverBody& body2 = m_tmpSolverBodyPool[constraint.m_solverBodyIdB];
341 const btSolverConstraint& c = constraint;
342 body1.internalApplyImpulse(c.m_contactNormal1 * body1.internalGetInvMass(), c.m_angularComponentA, additionaldeltaimpulse);
343 body2.internalApplyImpulse(c.m_contactNormal2 * body2.internalGetInvMass(), c.m_angularComponentB, additionaldeltaimpulse);
344 }
345 }
346 }
347 }
348 }
349 m_deltafLengthSqrPrev = deltaflengthsqr;
350 }
351
352 return deltaflengthsqr;
353}
354
355 btScalar btNNCGConstraintSolver::solveGroupCacheFriendlyFinish(btCollisionObject** bodies, int numBodies, const btContactSolverInfo& infoGlobal)
356{
357 m_pNC.resizeNoInitialize(0);
358 m_pC.resizeNoInitialize(0);
359 m_pCF.resizeNoInitialize(0);
360 m_pCRF.resizeNoInitialize(0);
361
362 m_deltafNC.resizeNoInitialize(0);
363 m_deltafC.resizeNoInitialize(0);
364 m_deltafCF.resizeNoInitialize(0);
365 m_deltafCRF.resizeNoInitialize(0);
366
367 return btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyFinish(bodies, numBodies, infoGlobal);
368}
SOLVER_INTERLEAVE_CONTACT_AND_FRICTION_CONSTRAINTS
@ SOLVER_INTERLEAVE_CONTACT_AND_FRICTION_CONSTRAINTS
Definition btContactSolverInfo.h:31
SOLVER_RANDMIZE_ORDER
@ SOLVER_RANDMIZE_ORDER
Definition btContactSolverInfo.h:23
SOLVER_USE_2_FRICTION_DIRECTIONS
@ SOLVER_USE_2_FRICTION_DIRECTIONS
Definition btContactSolverInfo.h:26
btNNCGConstraintSolver.h
btScalar
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition btScalar.h:314
btAlignedObjectArray::resizeNoInitialize
void resizeNoInitialize(int newsize)
resize changes the number of elements in the array.
Definition btAlignedObjectArray.h:194
btAlignedObjectArray::size
int size() const
return the number of elements in the array
Definition btAlignedObjectArray.h:142
btCollisionObject
btCollisionObject can be used to manage collision detection objects.
Definition btCollisionObject.h:51
btIDebugDraw
The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations.
Definition btIDebugDraw.h:27
btNNCGConstraintSolver::solveSingleIteration
virtual btScalar solveSingleIteration(int iteration, btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer)
Definition btNNCGConstraintSolver.cpp:35
btNNCGConstraintSolver::m_pCF
btAlignedObjectArray< btScalar > m_pCF
Definition btNNCGConstraintSolver.h:29
btNNCGConstraintSolver::solveGroupCacheFriendlyFinish
virtual btScalar solveGroupCacheFriendlyFinish(btCollisionObject **bodies, int numBodies, const btContactSolverInfo &infoGlobal)
Definition btNNCGConstraintSolver.cpp:355
btNNCGConstraintSolver::m_deltafCF
btAlignedObjectArray< btScalar > m_deltafCF
Definition btNNCGConstraintSolver.h:35
btNNCGConstraintSolver::m_deltafLengthSqrPrev
btScalar m_deltafLengthSqrPrev
Definition btNNCGConstraintSolver.h:25
btNNCGConstraintSolver::m_deltafC
btAlignedObjectArray< btScalar > m_deltafC
Definition btNNCGConstraintSolver.h:34
btNNCGConstraintSolver::m_deltafNC
btAlignedObjectArray< btScalar > m_deltafNC
Definition btNNCGConstraintSolver.h:33
btNNCGConstraintSolver::m_deltafCRF
btAlignedObjectArray< btScalar > m_deltafCRF
Definition btNNCGConstraintSolver.h:36
btNNCGConstraintSolver::solveGroupCacheFriendlySetup
virtual btScalar solveGroupCacheFriendlySetup(btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer)
Definition btNNCGConstraintSolver.cpp:18
btNNCGConstraintSolver::m_pCRF
btAlignedObjectArray< btScalar > m_pCRF
Definition btNNCGConstraintSolver.h:30
btNNCGConstraintSolver::m_pC
btAlignedObjectArray< btScalar > m_pC
Definition btNNCGConstraintSolver.h:28
btNNCGConstraintSolver::m_onlyForNoneContact
bool m_onlyForNoneContact
Definition btNNCGConstraintSolver.h:54
btNNCGConstraintSolver::m_pNC
btAlignedObjectArray< btScalar > m_pNC
Definition btNNCGConstraintSolver.h:27
btPersistentManifold
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
Definition btPersistentManifold.h:65
btSequentialImpulseConstraintSolver::btRandInt2
int btRandInt2(int n)
Definition btSequentialImpulseConstraintSolver.cpp:427
btSequentialImpulseConstraintSolver::m_tmpSolverContactConstraintPool
btConstraintArray m_tmpSolverContactConstraintPool
Definition btSequentialImpulseConstraintSolver.h:57
btSequentialImpulseConstraintSolver::m_tmpSolverContactFrictionConstraintPool
btConstraintArray m_tmpSolverContactFrictionConstraintPool
Definition btSequentialImpulseConstraintSolver.h:59
btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyFinish
virtual btScalar solveGroupCacheFriendlyFinish(btCollisionObject **bodies, int numBodies, const btContactSolverInfo &infoGlobal)
Definition btSequentialImpulseConstraintSolver.cpp:1836
btSequentialImpulseConstraintSolver::m_orderFrictionConstraintPool
btAlignedObjectArray< int > m_orderFrictionConstraintPool
Definition btSequentialImpulseConstraintSolver.h:64
btSequentialImpulseConstraintSolver::resolveSingleConstraintRowLowerLimit
btScalar resolveSingleConstraintRowLowerLimit(btSolverBody &bodyA, btSolverBody &bodyB, const btSolverConstraint &contactConstraint)
Definition btSequentialImpulseConstraintSolver.cpp:279
btSequentialImpulseConstraintSolver::resolveSingleConstraintRowGeneric
btScalar resolveSingleConstraintRowGeneric(btSolverBody &bodyA, btSolverBody &bodyB, const btSolverConstraint &contactConstraint)
Definition btSequentialImpulseConstraintSolver.cpp:269
btSequentialImpulseConstraintSolver::m_tmpSolverBodyPool
btAlignedObjectArray< btSolverBody > m_tmpSolverBodyPool
Definition btSequentialImpulseConstraintSolver.h:56
btSequentialImpulseConstraintSolver::m_orderTmpConstraintPool
btAlignedObjectArray< int > m_orderTmpConstraintPool
Definition btSequentialImpulseConstraintSolver.h:62
btSequentialImpulseConstraintSolver::m_orderNonContactConstraintPool
btAlignedObjectArray< int > m_orderNonContactConstraintPool
Definition btSequentialImpulseConstraintSolver.h:63
btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup
virtual btScalar solveGroupCacheFriendlySetup(btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer)
Definition btSequentialImpulseConstraintSolver.cpp:1403
btSequentialImpulseConstraintSolver::m_tmpSolverNonContactConstraintPool
btConstraintArray m_tmpSolverNonContactConstraintPool
Definition btSequentialImpulseConstraintSolver.h:58
btSequentialImpulseConstraintSolver::m_tmpSolverContactRollingFrictionConstraintPool
btConstraintArray m_tmpSolverContactRollingFrictionConstraintPool
Definition btSequentialImpulseConstraintSolver.h:60
btSequentialImpulseConstraintSolver::getOrInitSolverBody
int getOrInitSolverBody(btCollisionObject &body, btScalar timeStep)
Definition btSequentialImpulseConstraintSolver.cpp:691
btTypedConstraint
TypedConstraint is the baseclass for Bullet constraints and vehicles.
Definition btTypedConstraint.h:76
btTypedConstraint::solveConstraintObsolete
virtual void solveConstraintObsolete(btSolverBody &, btSolverBody &, btScalar)
internal method used by the constraint solver, don't use them directly
Definition btTypedConstraint.h:212
btContactSolverInfoData::m_numIterations
int m_numIterations
Definition btContactSolverInfo.h:44
btContactSolverInfoData::m_solverMode
int m_solverMode
Definition btContactSolverInfo.h:62
btContactSolverInfoData::m_timeStep
btScalar m_timeStep
Definition btContactSolverInfo.h:42
btContactSolverInfo
Definition btContactSolverInfo.h:76
btSolverBody
The btSolverBody is an internal datastructure for the constraint solver. Only necessary data is packe...
Definition btSolverBody.h:105
btSolverBody::internalApplyImpulse
void internalApplyImpulse(const btVector3 &linearComponent, const btVector3 &angularComponent, const btScalar impulseMagnitude)
Definition btSolverBody.h:243
btSolverBody::internalGetInvMass
const btVector3 & internalGetInvMass() const
Definition btSolverBody.h:212
btSolverConstraint
1D constraint along a normal axis between bodyA and bodyB. It can be combined to solve contact and fr...
Definition btSolverConstraint.h:31
btSolverConstraint::m_solverBodyIdA
int m_solverBodyIdA
Definition btSolverConstraint.h:62
btSolverConstraint::m_lowerLimit
btScalar m_lowerLimit
Definition btSolverConstraint.h:51
btSolverConstraint::m_contactNormal2
btVector3 m_contactNormal2
Definition btSolverConstraint.h:38
btSolverConstraint::m_angularComponentB
btVector3 m_angularComponentB
Definition btSolverConstraint.h:41
btSolverConstraint::m_friction
btScalar m_friction
Definition btSolverConstraint.h:46
btSolverConstraint::m_frictionIndex
int m_frictionIndex
Definition btSolverConstraint.h:61
btSolverConstraint::m_appliedImpulse
btSimdScalar m_appliedImpulse
Definition btSolverConstraint.h:44
btSolverConstraint::m_overrideNumSolverIterations
int m_overrideNumSolverIterations
Definition btSolverConstraint.h:60
btSolverConstraint::m_upperLimit
btScalar m_upperLimit
Definition btSolverConstraint.h:52
btSolverConstraint::m_angularComponentA
btVector3 m_angularComponentA
Definition btSolverConstraint.h:40
btSolverConstraint::m_contactNormal1
btVector3 m_contactNormal1
Definition btSolverConstraint.h:35
btSolverConstraint::m_solverBodyIdB
int m_solverBodyIdB
Definition btSolverConstraint.h:63