36 m_overlapFilterCallback(0),
37 m_ghostPairCallback(0)
39 int initialAllocatedSize= 2;
79 :m_cleanProxy(cleanProxy),
80 m_pairCache(pairCache),
81 m_dispatcher(dispatcher)
96 CleanPairCallback cleanPairs(proxy,
this,dispatcher);
114 :m_obsoleteProxy(obsoleteProxy)
119 return ((pair.
m_pProxy0 == m_obsoleteProxy) ||
126 RemovePairCallback removeCallback(proxy);
140 int proxyId1 = proxy0->
getUid();
141 int proxyId2 = proxy1->
getUid();
182 m_next.resize(newCapacity);
187 for (i= 0; i < newCapacity; ++i)
191 for (i = 0; i < newCapacity; ++i)
196 for(i=0;i<curHashtableSize;i++)
217 int proxyId1 = proxy0->
getUid();
218 int proxyId2 = proxy1->
getUid();
250 if (oldCapacity < newCapacity)
277 int proxyId1 = proxy0->
getUid();
278 int proxyId2 = proxy1->
getUid();
306 while (index != pairIndex)
332 if (lastPairIndex == pairIndex)
347 while (index != lastPairIndex)
378 BT_PROFILE(
"btHashedOverlappingPairCache::processAllOverlappingPairs");
408 for (i=0;i<tmpPairs.
size();i++)
413 for (i = 0; i <
m_next.size(); i++)
420 for (i=0;i<tmpPairs.
size();i++)
541 m_blockedForChanges(false),
542 m_hasDeferredRemoval(true),
543 m_overlapFilterCallback(0),
544 m_ghostPairCallback(0)
546 int initialAllocatedSize= 2;
579 :m_cleanProxy(cleanProxy),
580 m_pairCache(pairCache),
581 m_dispatcher(dispatcher)
596 CleanPairCallback cleanPairs(proxy,
this,dispatcher);
612 :m_obsoleteProxy(obsoleteProxy)
617 return ((pair.
m_pProxy0 == m_obsoleteProxy) ||
623 RemovePairCallback removeCallback(proxy);
int size() const
return the number of elements in the array
int findLinearSearch(const T &key) const
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
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.
virtual bool processOverlap(btBroadphasePair &pair)=0