Bullet Collision Detection & Physics Library: btOverlappingPairCache.h Source File

Bullet Collision Detection & Physics Library

btOverlappingPairCache.h
Go to the documentation of this file.
1 /*
2 Bullet Continuous Collision Detection and Physics Library
3 Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
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 #ifndef BT_OVERLAPPING_PAIR_CACHE_H
17 #define BT_OVERLAPPING_PAIR_CACHE_H
18
19
20 #include "btBroadphaseInterface.h"
21 #include "btBroadphaseProxy.h"
22 #include "btOverlappingPairCallback.h"
23
24 #include "LinearMath/btAlignedObjectArray.h"
25 class btDispatcher;
26
27 typedef btAlignedObjectArray<btBroadphasePair> btBroadphasePairArray;
28
29 struct btOverlapCallback
30 {
31 virtual ~btOverlapCallback()
32 {}
33 //return true for deletion of the pair
34 virtual bool processOverlap(btBroadphasePair& pair) = 0;
35
36 };
37
38 struct btOverlapFilterCallback
39 {
40 virtual ~btOverlapFilterCallback()
41 {}
42 // return true when pairs need collision
43 virtual bool needBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) const = 0;
44 };
45
46
47
48
49
50
51
52 extern int gRemovePairs;
53 extern int gAddedPairs;
54 extern int gFindPairs;
55
56 const int BT_NULL_PAIR=0xffffffff;
57
60 class btOverlappingPairCache : public btOverlappingPairCallback
61 {
62 public:
63 virtual ~btOverlappingPairCache() {} // this is needed so we can get to the derived class destructor
64
65 virtual btBroadphasePair* getOverlappingPairArrayPtr() = 0;
66
67 virtual const btBroadphasePair* getOverlappingPairArrayPtr() const = 0;
68
69 virtual btBroadphasePairArray& getOverlappingPairArray() = 0;
70
71 virtual void cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher) = 0;
72
73 virtual int getNumOverlappingPairs() const = 0;
74
75 virtual void cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher) = 0;
76
77 virtual void setOverlapFilterCallback(btOverlapFilterCallback* callback) = 0;
78
79 virtual void processAllOverlappingPairs(btOverlapCallback*,btDispatcher* dispatcher) = 0;
80
81 virtual btBroadphasePair* findPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) = 0;
82
83 virtual bool hasDeferredRemoval() = 0;
84
85 virtual void setInternalGhostPairCallback(btOverlappingPairCallback* ghostPairCallback)=0;
86
87 virtual void sortOverlappingPairs(btDispatcher* dispatcher) = 0;
88
89
90 };
91
93
94 ATTRIBUTE_ALIGNED16(class) btHashedOverlappingPairCache : public btOverlappingPairCache
95 {
96 btBroadphasePairArray m_overlappingPairArray;
97 btOverlapFilterCallback* m_overlapFilterCallback;
98
99 protected:
100
101 btAlignedObjectArray<int> m_hashTable;
102 btAlignedObjectArray<int> m_next;
103 btOverlappingPairCallback* m_ghostPairCallback;
104
105
106 public:
107 BT_DECLARE_ALIGNED_ALLOCATOR();
108
109 btHashedOverlappingPairCache();
110 virtual ~btHashedOverlappingPairCache();
111
112
113 void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
114
115 virtual void* removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1,btDispatcher* dispatcher);
116
117 SIMD_FORCE_INLINE bool needsBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) const
118 {
119 if (m_overlapFilterCallback)
120 return m_overlapFilterCallback->needBroadphaseCollision(proxy0,proxy1);
121
122 bool collides = (proxy0->m_collisionFilterGroup & proxy1->m_collisionFilterMask) != 0;
123 collides = collides && (proxy1->m_collisionFilterGroup & proxy0->m_collisionFilterMask);
124
125 return collides;
126 }
127
128 // Add a pair and return the new pair. If the pair already exists,
129 // no new pair is created and the old one is returned.
130 virtual btBroadphasePair* addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1)
131 {
132 gAddedPairs++;
133
134 if (!needsBroadphaseCollision(proxy0,proxy1))
135 return 0;
136
137 return internalAddPair(proxy0,proxy1);
138 }
139
140
141
142 void cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
143
144
145 virtual void processAllOverlappingPairs(btOverlapCallback*,btDispatcher* dispatcher);
146
147 virtual btBroadphasePair* getOverlappingPairArrayPtr()
148 {
149 return &m_overlappingPairArray[0];
150 }
151
152 const btBroadphasePair* getOverlappingPairArrayPtr() const
153 {
154 return &m_overlappingPairArray[0];
155 }
156
157 btBroadphasePairArray& getOverlappingPairArray()
158 {
159 return m_overlappingPairArray;
160 }
161
162 const btBroadphasePairArray& getOverlappingPairArray() const
163 {
164 return m_overlappingPairArray;
165 }
166
167 void cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher);
168
169
170
171 btBroadphasePair* findPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1);
172
173 int GetCount() const { return m_overlappingPairArray.size(); }
174 // btBroadphasePair* GetPairs() { return m_pairs; }
175
176 btOverlapFilterCallback* getOverlapFilterCallback()
177 {
178 return m_overlapFilterCallback;
179 }
180
181 void setOverlapFilterCallback(btOverlapFilterCallback* callback)
182 {
183 m_overlapFilterCallback = callback;
184 }
185
186 int getNumOverlappingPairs() const
187 {
188 return m_overlappingPairArray.size();
189 }
190 private:
191
192 btBroadphasePair* internalAddPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1);
193
194 void growTables();
195
196 SIMD_FORCE_INLINE bool equalsPair(const btBroadphasePair& pair, int proxyId1, int proxyId2)
197 {
198 return pair.m_pProxy0->getUid() == proxyId1 && pair.m_pProxy1->getUid() == proxyId2;
199 }
200
201 /*
202 // Thomas Wang's hash, see: http://www.concentric.net/~Ttwang/tech/inthash.htm
203 // This assumes proxyId1 and proxyId2 are 16-bit.
204 SIMD_FORCE_INLINE int getHash(int proxyId1, int proxyId2)
205 {
206 int key = (proxyId2 << 16) | proxyId1;
207 key = ~key + (key << 15);
208 key = key ^ (key >> 12);
209 key = key + (key << 2);
210 key = key ^ (key >> 4);
211 key = key * 2057;
212 key = key ^ (key >> 16);
213 return key;
214 }
215 */
216
217
218
219 SIMD_FORCE_INLINE unsigned int getHash(unsigned int proxyId1, unsigned int proxyId2)
220 {
221 int key = static_cast<int>(((unsigned int)proxyId1) | (((unsigned int)proxyId2) <<16));
222 // Thomas Wang's hash
223
224 key += ~(key << 15);
225 key ^= (key >> 10);
226 key += (key << 3);
227 key ^= (key >> 6);
228 key += ~(key << 11);
229 key ^= (key >> 16);
230 return static_cast<unsigned int>(key);
231 }
232
233
234
235
236
237 SIMD_FORCE_INLINE btBroadphasePair* internalFindPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1, int hash)
238 {
239 int proxyId1 = proxy0->getUid();
240 int proxyId2 = proxy1->getUid();
241 #if 0 // wrong, 'equalsPair' use unsorted uids, copy-past devil striked again. Nat.
242 if (proxyId1 > proxyId2)
243 btSwap(proxyId1, proxyId2);
244 #endif
245
246 int index = m_hashTable[hash];
247
248 while( index != BT_NULL_PAIR && equalsPair(m_overlappingPairArray[index], proxyId1, proxyId2) == false)
249 {
250 index = m_next[index];
251 }
252
253 if ( index == BT_NULL_PAIR )
254 {
255 return NULL;
256 }
257
258 btAssert(index < m_overlappingPairArray.size());
259
260 return &m_overlappingPairArray[index];
261 }
262
263 virtual bool hasDeferredRemoval()
264 {
265 return false;
266 }
267
268 virtual void setInternalGhostPairCallback(btOverlappingPairCallback* ghostPairCallback)
269 {
270 m_ghostPairCallback = ghostPairCallback;
271 }
272
273 virtual void sortOverlappingPairs(btDispatcher* dispatcher);
274
275
276
277 };
278
279
280
281
284 class btSortedOverlappingPairCache : public btOverlappingPairCache
285 {
286 protected:
287 //avoid brute-force finding all the time
288 btBroadphasePairArray m_overlappingPairArray;
289
290 //during the dispatch, check that user doesn't destroy/create proxy
291 bool m_blockedForChanges;
292
294 bool m_hasDeferredRemoval;
295
296 //if set, use the callback instead of the built in filter in needBroadphaseCollision
297 btOverlapFilterCallback* m_overlapFilterCallback;
298
299 btOverlappingPairCallback* m_ghostPairCallback;
300
301 public:
302
303 btSortedOverlappingPairCache();
304 virtual ~btSortedOverlappingPairCache();
305
306 virtual void processAllOverlappingPairs(btOverlapCallback*,btDispatcher* dispatcher);
307
308 void* removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1,btDispatcher* dispatcher);
309
310 void cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher);
311
312 btBroadphasePair* addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1);
313
314 btBroadphasePair* findPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1);
315
316
317 void cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
318
319 void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
320
321
322 inline bool needsBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) const
323 {
324 if (m_overlapFilterCallback)
325 return m_overlapFilterCallback->needBroadphaseCollision(proxy0,proxy1);
326
327 bool collides = (proxy0->m_collisionFilterGroup & proxy1->m_collisionFilterMask) != 0;
328 collides = collides && (proxy1->m_collisionFilterGroup & proxy0->m_collisionFilterMask);
329
330 return collides;
331 }
332
333 btBroadphasePairArray& getOverlappingPairArray()
334 {
335 return m_overlappingPairArray;
336 }
337
338 const btBroadphasePairArray& getOverlappingPairArray() const
339 {
340 return m_overlappingPairArray;
341 }
342
343
344
345
346 btBroadphasePair* getOverlappingPairArrayPtr()
347 {
348 return &m_overlappingPairArray[0];
349 }
350
351 const btBroadphasePair* getOverlappingPairArrayPtr() const
352 {
353 return &m_overlappingPairArray[0];
354 }
355
356 int getNumOverlappingPairs() const
357 {
358 return m_overlappingPairArray.size();
359 }
360
361 btOverlapFilterCallback* getOverlapFilterCallback()
362 {
363 return m_overlapFilterCallback;
364 }
365
366 void setOverlapFilterCallback(btOverlapFilterCallback* callback)
367 {
368 m_overlapFilterCallback = callback;
369 }
370
371 virtual bool hasDeferredRemoval()
372 {
373 return m_hasDeferredRemoval;
374 }
375
376 virtual void setInternalGhostPairCallback(btOverlappingPairCallback* ghostPairCallback)
377 {
378 m_ghostPairCallback = ghostPairCallback;
379 }
380
381 virtual void sortOverlappingPairs(btDispatcher* dispatcher);
382
383
384 };
385
386
387
389 class btNullPairCache : public btOverlappingPairCache
390 {
391
392 btBroadphasePairArray m_overlappingPairArray;
393
394 public:
395
396 virtual btBroadphasePair* getOverlappingPairArrayPtr()
397 {
398 return &m_overlappingPairArray[0];
399 }
400 const btBroadphasePair* getOverlappingPairArrayPtr() const
401 {
402 return &m_overlappingPairArray[0];
403 }
404 btBroadphasePairArray& getOverlappingPairArray()
405 {
406 return m_overlappingPairArray;
407 }
408
409 virtual void cleanOverlappingPair(btBroadphasePair& /*pair*/,btDispatcher* /*dispatcher*/)
410 {
411
412 }
413
414 virtual int getNumOverlappingPairs() const
415 {
416 return 0;
417 }
418
419 virtual void cleanProxyFromPairs(btBroadphaseProxy* /*proxy*/,btDispatcher* /*dispatcher*/)
420 {
421
422 }
423
424 virtual void setOverlapFilterCallback(btOverlapFilterCallback* /*callback*/)
425 {
426 }
427
428 virtual void processAllOverlappingPairs(btOverlapCallback*,btDispatcher* /*dispatcher*/)
429 {
430 }
431
432 virtual btBroadphasePair* findPair(btBroadphaseProxy* /*proxy0*/, btBroadphaseProxy* /*proxy1*/)
433 {
434 return 0;
435 }
436
437 virtual bool hasDeferredRemoval()
438 {
439 return true;
440 }
441
442 virtual void setInternalGhostPairCallback(btOverlappingPairCallback* /* ghostPairCallback */)
443 {
444
445 }
446
447 virtual btBroadphasePair* addOverlappingPair(btBroadphaseProxy* /*proxy0*/,btBroadphaseProxy* /*proxy1*/)
448 {
449 return 0;
450 }
451
452 virtual void* removeOverlappingPair(btBroadphaseProxy* /*proxy0*/,btBroadphaseProxy* /*proxy1*/,btDispatcher* /*dispatcher*/)
453 {
454 return 0;
455 }
456
457 virtual void removeOverlappingPairsContainingProxy(btBroadphaseProxy* /*proxy0*/,btDispatcher* /*dispatcher*/)
458 {
459 }
460
461 virtual void sortOverlappingPairs(btDispatcher* dispatcher)
462 {
463 (void) dispatcher;
464 }
465
466
467 };
468
469
470 #endif //BT_OVERLAPPING_PAIR_CACHE_H
471
472
btHashedOverlappingPairCache::hasDeferredRemoval
virtual bool hasDeferredRemoval()
Definition: btOverlappingPairCache.h:263
btOverlapFilterCallback
Definition: btOverlappingPairCache.h:38
btOverlappingPairCallback.h
btOverlapCallback
Definition: btOverlappingPairCache.h:29
btSortedOverlappingPairCache::getOverlapFilterCallback
btOverlapFilterCallback * getOverlapFilterCallback()
Definition: btOverlappingPairCache.h:361
btSortedOverlappingPairCache::getNumOverlappingPairs
int getNumOverlappingPairs() const
Definition: btOverlappingPairCache.h:356
btHashedOverlappingPairCache::getNumOverlappingPairs
int getNumOverlappingPairs() const
Definition: btOverlappingPairCache.h:186
btSortedOverlappingPairCache::m_overlapFilterCallback
btOverlapFilterCallback * m_overlapFilterCallback
Definition: btOverlappingPairCache.h:297
btAlignedObjectArray< btBroadphasePair >
BT_NULL_PAIR
const int BT_NULL_PAIR
Definition: btOverlappingPairCache.h:56
btNullPairCache
btNullPairCache skips add/removal of overlapping pairs. Userful for benchmarking and unit testing...
Definition: btOverlappingPairCache.h:389
btHashedOverlappingPairCache::internalFindPair
btBroadphasePair * internalFindPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1, int hash)
Definition: btOverlappingPairCache.h:237
btNullPairCache::getNumOverlappingPairs
virtual int getNumOverlappingPairs() const
Definition: btOverlappingPairCache.h:414
btHashedOverlappingPairCache::m_hashTable
btAlignedObjectArray< int > m_hashTable
Definition: btOverlappingPairCache.h:101
btAssert
#define btAssert(x)
Definition: btScalar.h:114
btNullPairCache::hasDeferredRemoval
virtual bool hasDeferredRemoval()
Definition: btOverlappingPairCache.h:437
btHashedOverlappingPairCache::getOverlappingPairArray
btBroadphasePairArray & getOverlappingPairArray()
Definition: btOverlappingPairCache.h:157
btSortedOverlappingPairCache::m_ghostPairCallback
btOverlappingPairCallback * m_ghostPairCallback
Definition: btOverlappingPairCache.h:299
SIMD_FORCE_INLINE
#define SIMD_FORCE_INLINE
Definition: btScalar.h:64
btSortedOverlappingPairCache::m_overlappingPairArray
btBroadphasePairArray m_overlappingPairArray
Definition: btOverlappingPairCache.h:288
btHashedOverlappingPairCache::equalsPair
bool equalsPair(const btBroadphasePair &pair, int proxyId1, int proxyId2)
Definition: btOverlappingPairCache.h:196
btHashedOverlappingPairCache::getOverlappingPairArrayPtr
const btBroadphasePair * getOverlappingPairArrayPtr() const
Definition: btOverlappingPairCache.h:152
btHashedOverlappingPairCache::getOverlappingPairArray
const btBroadphasePairArray & getOverlappingPairArray() const
Definition: btOverlappingPairCache.h:162
btHashedOverlappingPairCache::m_ghostPairCallback
btOverlappingPairCallback * m_ghostPairCallback
Definition: btOverlappingPairCache.h:103
btHashedOverlappingPairCache::m_overlapFilterCallback
btOverlapFilterCallback * m_overlapFilterCallback
Definition: btOverlappingPairCache.h:97
btHashedOverlappingPairCache::needsBroadphaseCollision
bool needsBroadphaseCollision(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1) const
Definition: btOverlappingPairCache.h:117
btNullPairCache::cleanProxyFromPairs
virtual void cleanProxyFromPairs(btBroadphaseProxy *, btDispatcher *)
Definition: btOverlappingPairCache.h:419
btBroadphaseInterface.h
btBroadphaseProxy::getUid
int getUid() const
Definition: btBroadphaseProxy.h:112
btNullPairCache::getOverlappingPairArrayPtr
virtual btBroadphasePair * getOverlappingPairArrayPtr()
Definition: btOverlappingPairCache.h:396
btSortedOverlappingPairCache::setOverlapFilterCallback
void setOverlapFilterCallback(btOverlapFilterCallback *callback)
Definition: btOverlappingPairCache.h:366
btHashedOverlappingPairCache::getOverlappingPairArrayPtr
virtual btBroadphasePair * getOverlappingPairArrayPtr()
Definition: btOverlappingPairCache.h:147
btNullPairCache::processAllOverlappingPairs
virtual void processAllOverlappingPairs(btOverlapCallback *, btDispatcher *)
Definition: btOverlappingPairCache.h:428
btOverlappingPairCache
The btOverlappingPairCache provides an interface for overlapping pair management (add, remove, storage), used by the btBroadphaseInterface broadphases.
Definition: btOverlappingPairCache.h:60
btSortedOverlappingPairCache::hasDeferredRemoval
virtual bool hasDeferredRemoval()
Definition: btOverlappingPairCache.h:371
btBroadphaseProxy::m_collisionFilterMask
int m_collisionFilterMask
Definition: btBroadphaseProxy.h:105
btHashedOverlappingPairCache::getHash
unsigned int getHash(unsigned int proxyId1, unsigned int proxyId2)
Definition: btOverlappingPairCache.h:219
btOverlapCallback::~btOverlapCallback
virtual ~btOverlapCallback()
Definition: btOverlappingPairCache.h:31
btNullPairCache::getOverlappingPairArrayPtr
const btBroadphasePair * getOverlappingPairArrayPtr() const
Definition: btOverlappingPairCache.h:400
btSortedOverlappingPairCache::getOverlappingPairArray
btBroadphasePairArray & getOverlappingPairArray()
Definition: btOverlappingPairCache.h:333
btOverlapFilterCallback::~btOverlapFilterCallback
virtual ~btOverlapFilterCallback()
Definition: btOverlappingPairCache.h:40
btSwap
void btSwap(T &a, T &b)
Definition: btScalar.h:586
btHashedOverlappingPairCache::getOverlapFilterCallback
btOverlapFilterCallback * getOverlapFilterCallback()
Definition: btOverlappingPairCache.h:176
btSortedOverlappingPairCache::needsBroadphaseCollision
bool needsBroadphaseCollision(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1) const
Definition: btOverlappingPairCache.h:322
btNullPairCache::removeOverlappingPairsContainingProxy
virtual void removeOverlappingPairsContainingProxy(btBroadphaseProxy *, btDispatcher *)
Definition: btOverlappingPairCache.h:457
btSortedOverlappingPairCache::getOverlappingPairArray
const btBroadphasePairArray & getOverlappingPairArray() const
Definition: btOverlappingPairCache.h:338
gFindPairs
int gFindPairs
Definition: btOverlappingPairCache.cpp:30
btBroadphaseProxy.h
gAddedPairs
int gAddedPairs
Definition: btOverlappingPairCache.cpp:29
btBroadphaseProxy::m_collisionFilterGroup
int m_collisionFilterGroup
Definition: btBroadphaseProxy.h:104
btSortedOverlappingPairCache
btSortedOverlappingPairCache maintains the objects with overlapping AABB Typically managed by the Bro...
Definition: btOverlappingPairCache.h:284
btHashedOverlappingPairCache::setOverlapFilterCallback
void setOverlapFilterCallback(btOverlapFilterCallback *callback)
Definition: btOverlappingPairCache.h:181
btOverlapFilterCallback::needBroadphaseCollision
virtual bool needBroadphaseCollision(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1) const =0
btOverlapCallback::processOverlap
virtual bool processOverlap(btBroadphasePair &pair)=0
btHashedOverlappingPairCache::m_next
btAlignedObjectArray< int > m_next
Definition: btOverlappingPairCache.h:102
btOverlappingPairCache::~btOverlappingPairCache
virtual ~btOverlappingPairCache()
Definition: btOverlappingPairCache.h:63
btBroadphaseProxy
The btBroadphaseProxy is the main class that can be used with the Bullet broadphases.
Definition: btBroadphaseProxy.h:85
btBroadphasePair::m_pProxy1
btBroadphaseProxy * m_pProxy1
Definition: btBroadphaseProxy.h:226
ATTRIBUTE_ALIGNED16
#define ATTRIBUTE_ALIGNED16(a)
Definition: btScalar.h:65
btSortedOverlappingPairCache::getOverlappingPairArrayPtr
const btBroadphasePair * getOverlappingPairArrayPtr() const
Definition: btOverlappingPairCache.h:351
btAlignedObjectArray::size
int size() const
return the number of elements in the array
Definition: btAlignedObjectArray.h:155
btHashedOverlappingPairCache::m_overlappingPairArray
btBroadphasePairArray m_overlappingPairArray
Definition: btOverlappingPairCache.h:96
btBroadphasePair::m_pProxy0
btBroadphaseProxy * m_pProxy0
Definition: btBroadphaseProxy.h:225
btSortedOverlappingPairCache::m_blockedForChanges
bool m_blockedForChanges
Definition: btOverlappingPairCache.h:291
btNullPairCache::cleanOverlappingPair
virtual void cleanOverlappingPair(btBroadphasePair &, btDispatcher *)
Definition: btOverlappingPairCache.h:409
btHashedOverlappingPairCache::setInternalGhostPairCallback
virtual void setInternalGhostPairCallback(btOverlappingPairCallback *ghostPairCallback)
Definition: btOverlappingPairCache.h:268
btBroadphasePairArray
btAlignedObjectArray< btBroadphasePair > btBroadphasePairArray
Definition: btOverlappingPairCache.h:25
btNullPairCache::setInternalGhostPairCallback
virtual void setInternalGhostPairCallback(btOverlappingPairCallback *)
Definition: btOverlappingPairCache.h:442
BT_DECLARE_ALIGNED_ALLOCATOR
#define BT_DECLARE_ALIGNED_ALLOCATOR()
Definition: btScalar.h:389
btNullPairCache::setOverlapFilterCallback
virtual void setOverlapFilterCallback(btOverlapFilterCallback *)
Definition: btOverlappingPairCache.h:424
btSortedOverlappingPairCache::setInternalGhostPairCallback
virtual void setInternalGhostPairCallback(btOverlappingPairCallback *ghostPairCallback)
Definition: btOverlappingPairCache.h:376
btNullPairCache::m_overlappingPairArray
btBroadphasePairArray m_overlappingPairArray
Definition: btOverlappingPairCache.h:392
btAlignedObjectArray.h
btSortedOverlappingPairCache::m_hasDeferredRemoval
bool m_hasDeferredRemoval
by default, do the removal during the pair traversal
Definition: btOverlappingPairCache.h:294
btNullPairCache::sortOverlappingPairs
virtual void sortOverlappingPairs(btDispatcher *dispatcher)
Definition: btOverlappingPairCache.h:461
btHashedOverlappingPairCache::addOverlappingPair
virtual btBroadphasePair * addOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
Definition: btOverlappingPairCache.h:130
btNullPairCache::findPair
virtual btBroadphasePair * findPair(btBroadphaseProxy *, btBroadphaseProxy *)
Definition: btOverlappingPairCache.h:432
btNullPairCache::getOverlappingPairArray
btBroadphasePairArray & getOverlappingPairArray()
Definition: btOverlappingPairCache.h:404
btDispatcher
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
Definition: btDispatcher.h:75
btHashedOverlappingPairCache::GetCount
int GetCount() const
Definition: btOverlappingPairCache.h:173
btHashedOverlappingPairCache
Hash-space based Pair Cache, thanks to Erin Catto, Box2D, http://www.box2d.org, and Pierre Terdiman...
Definition: btOverlappingPairCache.h:94
btNullPairCache::removeOverlappingPair
virtual void * removeOverlappingPair(btBroadphaseProxy *, btBroadphaseProxy *, btDispatcher *)
Definition: btOverlappingPairCache.h:452
btOverlappingPairCallback
The btOverlappingPairCallback class is an additional optional broadphase user callback for adding/rem...
Definition: btOverlappingPairCallback.h:24
gRemovePairs
int gRemovePairs
Definition: btOverlappingPairCache.cpp:28
btNullPairCache::addOverlappingPair
virtual btBroadphasePair * addOverlappingPair(btBroadphaseProxy *, btBroadphaseProxy *)
Definition: btOverlappingPairCache.h:447
btBroadphasePair
The btBroadphasePair class contains a pair of aabb-overlapping objects.
Definition: btBroadphaseProxy.h:185
btSortedOverlappingPairCache::getOverlappingPairArrayPtr
btBroadphasePair * getOverlappingPairArrayPtr()
Definition: btOverlappingPairCache.h:346