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

Bullet Collision Detection & Physics Library

btDiscreteDynamicsWorldMt.cpp
Go to the documentation of this file.
1 /*
2 Bullet Continuous Collision Detection and Physics Library
3 Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
4
5 This software is provided 'as-is', without any express or implied warranty.
6 In no event will the authors be held liable for any damages arising from the use of this software.
7 Permission is granted to anyone to use this software for any purpose,
8 including commercial applications, and to alter it and redistribute it freely,
9 subject to the following restrictions:
10
11 1. 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.
12 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
13 3. This notice may not be removed or altered from any source distribution.
14 */
15
16
17 #include "btDiscreteDynamicsWorldMt.h"
18
19 //collision detection
20 #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
21 #include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h"
22 #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
23 #include "BulletCollision/CollisionShapes/btCollisionShape.h"
24 #include "btSimulationIslandManagerMt.h"
25 #include "LinearMath/btTransformUtil.h"
26 #include "LinearMath/btQuickprof.h"
27
28 //rigidbody & constraints
29 #include "BulletDynamics/Dynamics/btRigidBody.h"
30 #include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"
31 #include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h"
32 #include "BulletDynamics/ConstraintSolver/btTypedConstraint.h"
33 #include "BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h"
34 #include "BulletDynamics/ConstraintSolver/btHingeConstraint.h"
35 #include "BulletDynamics/ConstraintSolver/btConeTwistConstraint.h"
36 #include "BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h"
37 #include "BulletDynamics/ConstraintSolver/btGeneric6DofSpring2Constraint.h"
38 #include "BulletDynamics/ConstraintSolver/btSliderConstraint.h"
39 #include "BulletDynamics/ConstraintSolver/btContactConstraint.h"
40
41
42 #include "LinearMath/btIDebugDraw.h"
43 #include "BulletCollision/CollisionShapes/btSphereShape.h"
44
45
46 #include "BulletDynamics/Dynamics/btActionInterface.h"
47 #include "LinearMath/btQuickprof.h"
48 #include "LinearMath/btMotionState.h"
49
50 #include "LinearMath/btSerializer.h"
51
52
53 struct InplaceSolverIslandCallbackMt : public btSimulationIslandManagerMt::IslandCallback
54 {
55 btContactSolverInfo* m_solverInfo;
56 btConstraintSolver* m_solver;
57 btIDebugDraw* m_debugDrawer;
58 btDispatcher* m_dispatcher;
59
60 InplaceSolverIslandCallbackMt(
61 btConstraintSolver* solver,
62 btStackAlloc* stackAlloc,
63 btDispatcher* dispatcher)
64 :m_solverInfo(NULL),
65 m_solver(solver),
66 m_debugDrawer(NULL),
67 m_dispatcher(dispatcher)
68 {
69
70 }
71
72 InplaceSolverIslandCallbackMt& operator=(InplaceSolverIslandCallbackMt& other)
73 {
74 btAssert(0);
75 (void)other;
76 return *this;
77 }
78
79 SIMD_FORCE_INLINE void setup ( btContactSolverInfo* solverInfo, btIDebugDraw* debugDrawer)
80 {
81 btAssert(solverInfo);
82 m_solverInfo = solverInfo;
83 m_debugDrawer = debugDrawer;
84 }
85
86
87 virtual void processIsland( btCollisionObject** bodies,
88 int numBodies,
89 btPersistentManifold** manifolds,
90 int numManifolds,
91 btTypedConstraint** constraints,
92 int numConstraints,
93 int islandId
94 )
95 {
96 m_solver->solveGroup( bodies,
97 numBodies,
98 manifolds,
99 numManifolds,
100 constraints,
101 numConstraints,
102 *m_solverInfo,
103 m_debugDrawer,
104 m_dispatcher
105 );
106 }
107
108 };
109
110
114
115 btConstraintSolverPoolMt::ThreadSolver* btConstraintSolverPoolMt::getAndLockThreadSolver()
116 {
117 int i = 0;
118 #if BT_THREADSAFE
119 i = btGetCurrentThreadIndex() % m_solvers.size();
120 #endif // #if BT_THREADSAFE
121 while ( true )
122 {
123 ThreadSolver& solver = m_solvers[ i ];
124 if ( solver.mutex.tryLock() )
125 {
126 return &solver;
127 }
128 // failed, try the next one
129 i = ( i + 1 ) % m_solvers.size();
130 }
131 return NULL;
132 }
133
134 void btConstraintSolverPoolMt::init( btConstraintSolver** solvers, int numSolvers )
135 {
136 m_solverType = BT_SEQUENTIAL_IMPULSE_SOLVER;
137 m_solvers.resize( numSolvers );
138 for ( int i = 0; i < numSolvers; ++i )
139 {
140 m_solvers[ i ].solver = solvers[ i ];
141 }
142 if ( numSolvers > 0 )
143 {
144 m_solverType = solvers[ 0 ]->getSolverType();
145 }
146 }
147
148 // create the solvers for me
149 btConstraintSolverPoolMt::btConstraintSolverPoolMt( int numSolvers )
150 {
151 btAlignedObjectArray<btConstraintSolver*> solvers;
152 solvers.reserve( numSolvers );
153 for ( int i = 0; i < numSolvers; ++i )
154 {
155 btConstraintSolver* solver = new btSequentialImpulseConstraintSolver();
156 solvers.push_back( solver );
157 }
158 init( &solvers[ 0 ], numSolvers );
159 }
160
161 // pass in fully constructed solvers (destructor will delete them)
162 btConstraintSolverPoolMt::btConstraintSolverPoolMt( btConstraintSolver** solvers, int numSolvers )
163 {
164 init( solvers, numSolvers );
165 }
166
167 btConstraintSolverPoolMt::~btConstraintSolverPoolMt()
168 {
169 // delete all solvers
170 for ( int i = 0; i < m_solvers.size(); ++i )
171 {
172 ThreadSolver& solver = m_solvers[ i ];
173 delete solver.solver;
174 solver.solver = NULL;
175 }
176 }
177
179 btScalar btConstraintSolverPoolMt::solveGroup( btCollisionObject** bodies,
180 int numBodies,
181 btPersistentManifold** manifolds,
182 int numManifolds,
183 btTypedConstraint** constraints,
184 int numConstraints,
185 const btContactSolverInfo& info,
186 btIDebugDraw* debugDrawer,
187 btDispatcher* dispatcher
188 )
189 {
190 ThreadSolver* ts = getAndLockThreadSolver();
191 ts->solver->solveGroup( bodies, numBodies, manifolds, numManifolds, constraints, numConstraints, info, debugDrawer, dispatcher );
192 ts->mutex.unlock();
193 return 0.0f;
194 }
195
196 void btConstraintSolverPoolMt::reset()
197 {
198 for ( int i = 0; i < m_solvers.size(); ++i )
199 {
200 ThreadSolver& solver = m_solvers[ i ];
201 solver.mutex.lock();
202 solver.solver->reset();
203 solver.mutex.unlock();
204 }
205 }
206
207
211
212 btDiscreteDynamicsWorldMt::btDiscreteDynamicsWorldMt(btDispatcher* dispatcher, btBroadphaseInterface* pairCache, btConstraintSolverPoolMt* constraintSolver, btCollisionConfiguration* collisionConfiguration)
213 : btDiscreteDynamicsWorld(dispatcher,pairCache,constraintSolver,collisionConfiguration)
214 {
215 if (m_ownsIslandManager)
216 {
217 m_islandManager->~btSimulationIslandManager();
218 btAlignedFree( m_islandManager);
219 }
220 {
221 void* mem = btAlignedAlloc(sizeof(InplaceSolverIslandCallbackMt),16);
222 m_solverIslandCallbackMt = new (mem) InplaceSolverIslandCallbackMt (m_constraintSolver, 0, dispatcher);
223 }
224 {
225 void* mem = btAlignedAlloc(sizeof(btSimulationIslandManagerMt),16);
226 btSimulationIslandManagerMt* im = new (mem) btSimulationIslandManagerMt();
227 im->setMinimumSolverBatchSize( m_solverInfo.m_minimumSolverBatchSize );
228 m_islandManager = im;
229 }
230 }
231
232
233 btDiscreteDynamicsWorldMt::~btDiscreteDynamicsWorldMt()
234 {
235 if (m_solverIslandCallbackMt)
236 {
237 m_solverIslandCallbackMt->~InplaceSolverIslandCallbackMt();
238 btAlignedFree(m_solverIslandCallbackMt);
239 }
240 if (m_ownsConstraintSolver)
241 {
242 m_constraintSolver->~btConstraintSolver();
243 btAlignedFree(m_constraintSolver);
244 }
245 }
246
247
248 void btDiscreteDynamicsWorldMt::solveConstraints(btContactSolverInfo& solverInfo)
249 {
250 BT_PROFILE("solveConstraints");
251
252 m_solverIslandCallbackMt->setup(&solverInfo, getDebugDrawer());
253 m_constraintSolver->prepareSolve(getCollisionWorld()->getNumCollisionObjects(), getCollisionWorld()->getDispatcher()->getNumManifolds());
254
256 btSimulationIslandManagerMt* im = static_cast<btSimulationIslandManagerMt*>(m_islandManager);
257 im->buildAndProcessIslands( getCollisionWorld()->getDispatcher(), getCollisionWorld(), m_constraints, m_solverIslandCallbackMt );
258
259 m_constraintSolver->allSolved(solverInfo, m_debugDrawer);
260 }
261
262
263 struct UpdaterUnconstrainedMotion : public btIParallelForBody
264 {
265 btScalar timeStep;
266 btRigidBody** rigidBodies;
267
268 void forLoop( int iBegin, int iEnd ) const BT_OVERRIDE
269 {
270 for ( int i = iBegin; i < iEnd; ++i )
271 {
272 btRigidBody* body = rigidBodies[ i ];
273 if ( !body->isStaticOrKinematicObject() )
274 {
275 //don't integrate/update velocities here, it happens in the constraint solver
276 body->applyDamping( timeStep );
277 body->predictIntegratedTransform( timeStep, body->getInterpolationWorldTransform() );
278 }
279 }
280 }
281 };
282
283
284 void btDiscreteDynamicsWorldMt::predictUnconstraintMotion( btScalar timeStep )
285 {
286 BT_PROFILE( "predictUnconstraintMotion" );
287 if ( m_nonStaticRigidBodies.size() > 0 )
288 {
289 UpdaterUnconstrainedMotion update;
290 update.timeStep = timeStep;
291 update.rigidBodies = &m_nonStaticRigidBodies[ 0 ];
292 int grainSize = 50; // num of iterations per task for task scheduler
293 btParallelFor( 0, m_nonStaticRigidBodies.size(), grainSize, update );
294 }
295 }
296
297
298 void btDiscreteDynamicsWorldMt::createPredictiveContacts( btScalar timeStep )
299 {
300 BT_PROFILE( "createPredictiveContacts" );
301 releasePredictiveContacts();
302 if ( m_nonStaticRigidBodies.size() > 0 )
303 {
304 UpdaterCreatePredictiveContacts update;
305 update.world = this;
306 update.timeStep = timeStep;
307 update.rigidBodies = &m_nonStaticRigidBodies[ 0 ];
308 int grainSize = 50; // num of iterations per task for task scheduler
309 btParallelFor( 0, m_nonStaticRigidBodies.size(), grainSize, update );
310 }
311 }
312
313
314 void btDiscreteDynamicsWorldMt::integrateTransforms( btScalar timeStep )
315 {
316 BT_PROFILE( "integrateTransforms" );
317 if ( m_nonStaticRigidBodies.size() > 0 )
318 {
319 UpdaterIntegrateTransforms update;
320 update.world = this;
321 update.timeStep = timeStep;
322 update.rigidBodies = &m_nonStaticRigidBodies[ 0 ];
323 int grainSize = 50; // num of iterations per task for task scheduler
324 btParallelFor( 0, m_nonStaticRigidBodies.size(), grainSize, update );
325 }
326 }
327
btAlignedObjectArray::reserve
void reserve(int _Count)
Definition: btAlignedObjectArray.h:298
btConstraintSolverPoolMt::solveGroup
virtual btScalar solveGroup(btCollisionObject **bodies, int numBodies, btPersistentManifold **manifolds, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &info, btIDebugDraw *debugDrawer, btDispatcher *dispatcher) BT_OVERRIDE
solve a group of constraints
Definition: btDiscreteDynamicsWorldMt.cpp:179
btConstraintSolverPoolMt::~btConstraintSolverPoolMt
virtual ~btConstraintSolverPoolMt()
Definition: btDiscreteDynamicsWorldMt.cpp:167
btTransformUtil.h
btPersistentManifold
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
Definition: btPersistentManifold.h:63
btAlignedObjectArray::push_back
void push_back(const T &_Val)
Definition: btAlignedObjectArray.h:274
btDiscreteDynamicsWorldMt::UpdaterCreatePredictiveContacts::timeStep
btScalar timeStep
Definition: btDiscreteDynamicsWorldMt.h:99
btConstraintSolverPoolMt
btConstraintSolverPoolMt - masquerades as a constraint solver, but really it is a threadsafe pool of ...
Definition: btDiscreteDynamicsWorldMt.h:35
btDiscreteDynamicsWorldMt::btDiscreteDynamicsWorldMt
btDiscreteDynamicsWorldMt(btDispatcher *dispatcher, btBroadphaseInterface *pairCache, btConstraintSolverPoolMt *constraintSolver, btCollisionConfiguration *collisionConfiguration)
btDiscreteDynamicsWorldMt
Definition: btDiscreteDynamicsWorldMt.cpp:212
btDiscreteDynamicsWorld::m_islandManager
btSimulationIslandManager * m_islandManager
Definition: btDiscreteDynamicsWorld.h:47
btConstraintSolverPoolMt::ThreadSolver::solver
btConstraintSolver * solver
Definition: btDiscreteDynamicsWorldMt.h:65
btDiscreteDynamicsWorld::m_nonStaticRigidBodies
btAlignedObjectArray< btRigidBody * > m_nonStaticRigidBodies
Definition: btDiscreteDynamicsWorld.h:51
btAlignedObjectArray
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
Definition: btAlignedObjectArray.h:53
btDiscreteDynamicsWorldMt::createPredictiveContacts
virtual void createPredictiveContacts(btScalar timeStep) BT_OVERRIDE
Definition: btDiscreteDynamicsWorldMt.cpp:298
btRigidBody::predictIntegratedTransform
void predictIntegratedTransform(btScalar step, btTransform &predictedTransform)
continuous collision detection needs prediction
Definition: btRigidBody.cpp:106
btConstraintSolverPoolMt::ThreadSolver
Definition: btDiscreteDynamicsWorldMt.h:63
btSimulationIslandManagerMt::buildAndProcessIslands
virtual void buildAndProcessIslands(btDispatcher *dispatcher, btCollisionWorld *collisionWorld, btAlignedObjectArray< btTypedConstraint *> &constraints, IslandCallback *callback)
Definition: btSimulationIslandManagerMt.cpp:606
btDiscreteDynamicsWorldMt::solveConstraints
virtual void solveConstraints(btContactSolverInfo &solverInfo) BT_OVERRIDE
Definition: btDiscreteDynamicsWorldMt.cpp:248
btSpinMutex::tryLock
bool tryLock()
Definition: btThreads.cpp:216
btDiscreteDynamicsWorldMt::UpdaterCreatePredictiveContacts::rigidBodies
btRigidBody ** rigidBodies
Definition: btDiscreteDynamicsWorldMt.h:100
btDiscreteDynamicsWorld
btDiscreteDynamicsWorld provides discrete rigid body simulation those classes replace the obsolete Cc...
Definition: btDiscreteDynamicsWorld.h:38
btAssert
#define btAssert(x)
Definition: btScalar.h:131
btDiscreteDynamicsWorld::releasePredictiveContacts
void releasePredictiveContacts()
Definition: btDiscreteDynamicsWorld.cpp:966
btSequentialImpulseConstraintSolver.h
btCollisionConfiguration
btCollisionConfiguration allows to configure Bullet collision detection stack allocator size...
Definition: btCollisionConfiguration.h:26
btActionInterface.h
btContactConstraint.h
btConstraintSolver::solveGroup
virtual btScalar solveGroup(btCollisionObject **bodies, int numBodies, btPersistentManifold **manifold, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &info, class btIDebugDraw *debugDrawer, btDispatcher *dispatcher)=0
solve a group of constraints
btDiscreteDynamicsWorldMt::UpdaterIntegrateTransforms::timeStep
btScalar timeStep
Definition: btDiscreteDynamicsWorldMt.h:112
SIMD_FORCE_INLINE
#define SIMD_FORCE_INLINE
Definition: btScalar.h:81
BT_SEQUENTIAL_IMPULSE_SOLVER
Definition: btConstraintSolver.h:35
btDiscreteDynamicsWorld::m_ownsConstraintSolver
bool m_ownsConstraintSolver
Definition: btDiscreteDynamicsWorld.h:61
btDiscreteDynamicsWorldMt::UpdaterIntegrateTransforms::world
btDiscreteDynamicsWorldMt * world
Definition: btDiscreteDynamicsWorldMt.h:114
InplaceSolverIslandCallbackMt::m_solverInfo
btContactSolverInfo * m_solverInfo
Definition: btDiscreteDynamicsWorldMt.cpp:55
btConstraintSolverPoolMt::init
void init(btConstraintSolver **solvers, int numSolvers)
Definition: btDiscreteDynamicsWorldMt.cpp:134
InplaceSolverIslandCallbackMt::InplaceSolverIslandCallbackMt
InplaceSolverIslandCallbackMt(btConstraintSolver *solver, btStackAlloc *stackAlloc, btDispatcher *dispatcher)
Definition: btDiscreteDynamicsWorldMt.cpp:60
btConstraintSolverPoolMt::reset
virtual void reset() BT_OVERRIDE
clear internal cached data and reset random seed
Definition: btDiscreteDynamicsWorldMt.cpp:196
btRigidBody.h
btDiscreteDynamicsWorldMt::predictUnconstraintMotion
virtual void predictUnconstraintMotion(btScalar timeStep) BT_OVERRIDE
Definition: btDiscreteDynamicsWorldMt.cpp:284
btCollisionObject::isStaticOrKinematicObject
bool isStaticOrKinematicObject() const
Definition: btCollisionObject.h:207
btSimulationIslandManagerMt.h
btConstraintSolverPoolMt::ThreadSolver::mutex
btSpinMutex mutex
Definition: btDiscreteDynamicsWorldMt.h:66
btStackAlloc
The StackAlloc class provides some fast stack-based memory allocator (LIFO last-in first-out) ...
Definition: btStackAlloc.h:34
btDynamicsWorld::m_solverInfo
btContactSolverInfo m_solverInfo
Definition: btDynamicsWorld.h:50
btCollisionWorld::getNumCollisionObjects
int getNumCollisionObjects() const
Definition: btCollisionWorld.h:440
btDiscreteDynamicsWorldMt::UpdaterIntegrateTransforms
Definition: btDiscreteDynamicsWorldMt.h:110
btTypedConstraint.h
btDiscreteDynamicsWorld::getCollisionWorld
btCollisionWorld * getCollisionWorld()
Definition: btDiscreteDynamicsWorld.h:138
btPoint2PointConstraint.h
InplaceSolverIslandCallbackMt::m_dispatcher
btDispatcher * m_dispatcher
Definition: btDiscreteDynamicsWorldMt.cpp:58
btSimpleBroadphase.h
BT_OVERRIDE
#define BT_OVERRIDE
Definition: btThreads.h:28
btCollisionWorld::m_debugDrawer
btIDebugDraw * m_debugDrawer
Definition: btCollisionWorld.h:102
btCollisionWorld::getDebugDrawer
virtual btIDebugDraw * getDebugDrawer()
Definition: btCollisionWorld.h:162
btSpinMutex::lock
void lock()
Definition: btThreads.cpp:206
btConstraintSolverPoolMt::getAndLockThreadSolver
ThreadSolver * getAndLockThreadSolver()
btConstraintSolverPoolMt
Definition: btDiscreteDynamicsWorldMt.cpp:115
btDiscreteDynamicsWorldMt::integrateTransforms
virtual void integrateTransforms(btScalar timeStep) BT_OVERRIDE
Definition: btDiscreteDynamicsWorldMt.cpp:314
InplaceSolverIslandCallbackMt::m_debugDrawer
btIDebugDraw * m_debugDrawer
Definition: btDiscreteDynamicsWorldMt.cpp:57
btSpinMutex::unlock
void unlock()
Definition: btThreads.cpp:211
btAlignedFree
#define btAlignedFree(ptr)
Definition: btAlignedAllocator.h:48
btCollisionObject
btCollisionObject can be used to manage collision detection objects.
Definition: btCollisionObject.h:49
UpdaterUnconstrainedMotion
Definition: btDiscreteDynamicsWorldMt.cpp:263
btIDebugDraw
The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations...
Definition: btIDebugDraw.h:29
btConeTwistConstraint.h
btCollisionObject::getInterpolationWorldTransform
const btTransform & getInterpolationWorldTransform() const
Definition: btCollisionObject.h:405
btRigidBody
The btRigidBody is the main class for rigid body objects.
Definition: btRigidBody.h:62
InplaceSolverIslandCallbackMt::setup
void setup(btContactSolverInfo *solverInfo, btIDebugDraw *debugDrawer)
Definition: btDiscreteDynamicsWorldMt.cpp:79
btBroadphaseInterface
The btBroadphaseInterface class provides an interface to detect aabb-overlapping object pairs...
Definition: btBroadphaseInterface.h:55
btHingeConstraint.h
btCollisionWorld::getDispatcher
btDispatcher * getDispatcher()
Definition: btCollisionWorld.h:138
btConstraintSolver::getSolverType
virtual btConstraintSolverType getSolverType() const =0
btSequentialImpulseConstraintSolver
The btSequentialImpulseConstraintSolver is a fast SIMD implementation of the Projected Gauss Seidel (...
Definition: btSequentialImpulseConstraintSolver.h:33
btCollisionShape.h
btAlignedObjectArray::size
int size() const
return the number of elements in the array
Definition: btAlignedObjectArray.h:155
BT_PROFILE
#define BT_PROFILE(name)
Definition: btQuickprof.h:215
btMotionState.h
UpdaterUnconstrainedMotion::timeStep
btScalar timeStep
Definition: btDiscreteDynamicsWorldMt.cpp:265
btSimulationIslandManagerMt::IslandCallback
Definition: btSimulationIslandManagerMt.h:48
btContactSolverInfo
Definition: btContactSolverInfo.h:69
InplaceSolverIslandCallbackMt
Definition: btDiscreteDynamicsWorldMt.cpp:53
btConstraintSolver::allSolved
virtual void allSolved(const btContactSolverInfo &, class btIDebugDraw *)
Definition: btConstraintSolver.h:52
btRigidBody::applyDamping
void applyDamping(btScalar timeStep)
applyDamping damps the velocity, using the given m_linearDamping and m_angularDamping ...
Definition: btRigidBody.cpp:161
btContactSolverInfoData::m_minimumSolverBatchSize
int m_minimumSolverBatchSize
Definition: btContactSolverInfo.h:61
btDiscreteDynamicsWorldMt::UpdaterIntegrateTransforms::rigidBodies
btRigidBody ** rigidBodies
Definition: btDiscreteDynamicsWorldMt.h:113
btIDebugDraw.h
btCollisionDispatcher.h
btConstraintSolver::prepareSolve
virtual void prepareSolve(int, int)
Definition: btConstraintSolver.h:47
UpdaterUnconstrainedMotion::rigidBodies
btRigidBody ** rigidBodies
Definition: btDiscreteDynamicsWorldMt.cpp:266
btTypedConstraint
TypedConstraint is the baseclass for Bullet constraints and vehicles.
Definition: btTypedConstraint.h:78
btQuickprof.h
btConstraintSolverPoolMt::btConstraintSolverPoolMt
btConstraintSolverPoolMt(int numSolvers)
Definition: btDiscreteDynamicsWorldMt.cpp:149
btSimulationIslandManagerMt::setMinimumSolverBatchSize
void setMinimumSolverBatchSize(int sz)
Definition: btSimulationIslandManagerMt.h:94
btGeneric6DofSpring2Constraint.h
btSliderConstraint.h
btAlignedAlloc
#define btAlignedAlloc(size, alignment)
Definition: btAlignedAllocator.h:47
btDiscreteDynamicsWorld::m_constraintSolver
btConstraintSolver * m_constraintSolver
Definition: btDiscreteDynamicsWorld.h:45
btDiscreteDynamicsWorld::m_ownsIslandManager
bool m_ownsIslandManager
Definition: btDiscreteDynamicsWorld.h:60
InplaceSolverIslandCallbackMt::processIsland
virtual void processIsland(btCollisionObject **bodies, int numBodies, btPersistentManifold **manifolds, int numManifolds, btTypedConstraint **constraints, int numConstraints, int islandId)
Definition: btDiscreteDynamicsWorldMt.cpp:87
InplaceSolverIslandCallbackMt::operator=
InplaceSolverIslandCallbackMt & operator=(InplaceSolverIslandCallbackMt &other)
Definition: btDiscreteDynamicsWorldMt.cpp:72
InplaceSolverIslandCallbackMt::m_solver
btConstraintSolver * m_solver
Definition: btDiscreteDynamicsWorldMt.cpp:56
btParallelFor
void btParallelFor(int iBegin, int iEnd, int grainSize, const btIParallelForBody &body)
Definition: btThreads.cpp:429
btGetCurrentThreadIndex
unsigned int btGetCurrentThreadIndex()
Definition: btThreads.cpp:304
btIParallelForBody
Definition: btThreads.h:98
UpdaterUnconstrainedMotion::forLoop
void forLoop(int iBegin, int iEnd) const BT_OVERRIDE
Definition: btDiscreteDynamicsWorldMt.cpp:268
btConstraintSolver::reset
virtual void reset()=0
clear internal cached data and reset random seed
btDiscreteDynamicsWorldMt::~btDiscreteDynamicsWorldMt
virtual ~btDiscreteDynamicsWorldMt()
Definition: btDiscreteDynamicsWorldMt.cpp:233
btSphereShape.h
btDispatcher
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
Definition: btDispatcher.h:75
btGeneric6DofConstraint.h
btScalar
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:292
btDiscreteDynamicsWorldMt::m_solverIslandCallbackMt
InplaceSolverIslandCallbackMt * m_solverIslandCallbackMt
Definition: btDiscreteDynamicsWorldMt.h:91
btDiscreteDynamicsWorldMt.h
btSimulationIslandManagerMt
SimulationIslandManagerMt – Multithread capable version of SimulationIslandManager Splits the world...
Definition: btSimulationIslandManagerMt.h:33
btDiscreteDynamicsWorldMt::UpdaterCreatePredictiveContacts::world
btDiscreteDynamicsWorldMt * world
Definition: btDiscreteDynamicsWorldMt.h:101
btDiscreteDynamicsWorldMt::UpdaterCreatePredictiveContacts
Definition: btDiscreteDynamicsWorldMt.h:97
btSimulationIslandManager::~btSimulationIslandManager
virtual ~btSimulationIslandManager()
Definition: btSimulationIslandManager.cpp:33
btCollisionAlgorithm.h
btContactSolverInfo.h
btConstraintSolver::~btConstraintSolver
virtual ~btConstraintSolver()
Definition: btConstraintSolver.h:45
btSerializer.h
btDiscreteDynamicsWorld::m_constraints
btAlignedObjectArray< btTypedConstraint * > m_constraints
Definition: btDiscreteDynamicsWorld.h:49
btConstraintSolver
Definition: btConstraintSolver.h:40