25 m_ghostPairCallback(0)
27 int initialAllocatedSize = 2;
58 : m_cleanProxy(cleanProxy),
59 m_pairCache(pairCache),
60 m_dispatcher(dispatcher)
74 CleanPairCallback cleanPairs(proxy,
this, dispatcher);
87 : m_obsoleteProxy(obsoleteProxy)
92 return ((pair.
m_pProxy0 == m_obsoleteProxy) ||
97 RemovePairCallback removeCallback(proxy);
106 int proxyId1 = proxy0->
getUid();
107 int proxyId2 = proxy1->
getUid();
151 for (i = 0; i < newCapacity; ++i)
155 for (i = 0; i < newCapacity; ++i)
160 for (i = 0; i < curHashtableSize; i++)
178 int proxyId1 = proxy0->
getUid();
179 int proxyId2 = proxy1->
getUid();
210 if (oldCapacity < newCapacity)
233 int proxyId1 = proxy0->
getUid();
234 int proxyId2 = proxy1->
getUid();
262 while (index != pairIndex)
288 if (lastPairIndex == pairIndex)
303 while (index != lastPairIndex)
334 BT_PROFILE(
"btHashedOverlappingPairCache::processAllOverlappingPairs");
368 return uidA0 > uidB0 || (uidA0 == uidB0 && uidA1 > uidB1);
381 for (
int i = 0; i < indices.
size(); i++)
387 indices[i].m_uidA0 = uidA0;
388 indices[i].m_uidA1 = uidA1;
389 indices[i].m_orgIndex = i;
394 BT_PROFILE(
"btHashedOverlappingPairCache::processAllOverlappingPairs");
396 for (i = 0; i < indices.
size();)
426 for (i = 0; i < tmpPairs.
size(); i++)
438 for (i = 0; i < tmpPairs.
size(); i++)
530 m_hasDeferredRemoval(true),
531 m_overlapFilterCallback(0),
532 m_ghostPairCallback(0)
534 int initialAllocatedSize = 2;
564 : m_cleanProxy(cleanProxy),
565 m_pairCache(pairCache),
566 m_dispatcher(dispatcher)
580 CleanPairCallback cleanPairs(proxy,
this, dispatcher);
593 : m_obsoleteProxy(obsoleteProxy)
598 return ((pair.
m_pProxy0 == m_obsoleteProxy) ||
603 RemovePairCallback removeCallback(proxy);
bool operator()(const MyPairIndex &a, const MyPairIndex &b) const
int size() const
return the number of elements in the array
int findLinearSearch(const T &key) const
void resize(int newsize, const T &fillData=T())
void swap(int index0, int index1)
T & expandNonInitializing()
void quickSort(const L &CompareFunc)
void push_back(const T &_Val)
int capacity() const
return the pre-allocated (reserved) elements, this is at least as large as the total number of elemen...
virtual ~btCollisionAlgorithm()
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
virtual void freeCollisionAlgorithm(void *ptr)=0
void removeOverlappingPairsContainingProxy(btBroadphaseProxy *proxy, btDispatcher *dispatcher)
void cleanOverlappingPair(btBroadphasePair &pair, btDispatcher *dispatcher)
void cleanProxyFromPairs(btBroadphaseProxy *proxy, btDispatcher *dispatcher)
virtual ~btHashedOverlappingPairCache()
btAlignedObjectArray< int > m_next
btBroadphasePairArray m_overlappingPairArray
btBroadphasePair * findPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
virtual void sortOverlappingPairs(btDispatcher *dispatcher)
btBroadphasePair * internalFindPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1, int hash)
virtual btBroadphasePair * addOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
btHashedOverlappingPairCache()
btBroadphasePair * internalAddPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
bool equalsPair(const btBroadphasePair &pair, int proxyId1, int proxyId2)
virtual void * removeOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1, btDispatcher *dispatcher)
unsigned int getHash(unsigned int proxyId1, unsigned int proxyId2)
btAlignedObjectArray< int > m_hashTable
btOverlappingPairCallback * m_ghostPairCallback
btBroadphasePairArray & getOverlappingPairArray()
virtual void processAllOverlappingPairs(btOverlapCallback *, btDispatcher *dispatcher)
The btOverlappingPairCache provides an interface for overlapping pair management (add,...
virtual void cleanOverlappingPair(btBroadphasePair &pair, btDispatcher *dispatcher)=0
virtual void * removeOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1, btDispatcher *dispatcher)=0
virtual btBroadphasePair * addOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)=0
virtual void processAllOverlappingPairs(btOverlapCallback *, btDispatcher *dispatcher)
btSortedOverlappingPairCache()
btBroadphasePair * addOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
virtual ~btSortedOverlappingPairCache()
virtual bool hasDeferredRemoval()
btBroadphasePair * findPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
this findPair becomes really slow.
bool needsBroadphaseCollision(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1) const
void removeOverlappingPairsContainingProxy(btBroadphaseProxy *proxy, btDispatcher *dispatcher)
btOverlappingPairCallback * m_ghostPairCallback
void cleanOverlappingPair(btBroadphasePair &pair, btDispatcher *dispatcher)
void * removeOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1, btDispatcher *dispatcher)
btBroadphasePairArray m_overlappingPairArray
void cleanProxyFromPairs(btBroadphaseProxy *proxy, btDispatcher *dispatcher)
virtual void sortOverlappingPairs(btDispatcher *dispatcher)
The btBroadphasePair class contains a pair of aabb-overlapping objects.
btBroadphaseProxy * m_pProxy1
btBroadphaseProxy * m_pProxy0
btCollisionAlgorithm * m_algorithm
The btBroadphaseProxy is the main class that can be used with the Bullet broadphases.
bool m_deterministicOverlappingPairs
virtual bool processOverlap(btBroadphasePair &pair)=0