36 m_overlapFilterCallback(0),
37 m_blockedForChanges(false),
38 m_ghostPairCallback(0)
40 int initialAllocatedSize= 2;
80 :m_cleanProxy(cleanProxy),
81 m_pairCache(pairCache),
82 m_dispatcher(dispatcher)
90 m_pairCache->cleanOverlappingPair(pair,m_dispatcher);
97 CleanPairCallback cleanPairs(proxy,
this,dispatcher);
115 :m_obsoleteProxy(obsoleteProxy)
120 return ((pair.
m_pProxy0 == m_obsoleteProxy) ||
127 RemovePairCallback removeCallback(proxy);
141 int proxyId1 = proxy0->
getUid();
142 int proxyId2 = proxy1->
getUid();
188 for (i= 0; i < newCapacity; ++i)
192 for (i = 0; i < newCapacity; ++i)
197 for(i=0;i<curHashtableSize;i++)
218 int proxyId1 = proxy0->
getUid();
219 int proxyId2 = proxy1->
getUid();
251 if (oldCapacity < newCapacity)
278 int proxyId1 = proxy0->
getUid();
279 int proxyId2 = proxy1->
getUid();
307 while (index != pairIndex)
333 if (lastPairIndex == pairIndex)
348 while (index != lastPairIndex)
409 for (i=0;i<tmpPairs.
size();i++)
421 for (i=0;i<tmpPairs.
size();i++)
542 m_blockedForChanges(false),
543 m_hasDeferredRemoval(true),
544 m_overlapFilterCallback(0),
545 m_ghostPairCallback(0)
547 int initialAllocatedSize= 2;
580 :m_cleanProxy(cleanProxy),
581 m_pairCache(pairCache),
582 m_dispatcher(dispatcher)
590 m_pairCache->cleanOverlappingPair(pair,m_dispatcher);
597 CleanPairCallback cleanPairs(proxy,
this,dispatcher);
613 :m_obsoleteProxy(obsoleteProxy)
618 return ((pair.
m_pProxy0 == m_obsoleteProxy) ||
624 RemovePairCallback removeCallback(proxy);
void push_back(const T &_Val)
virtual void processAllOverlappingPairs(btOverlapCallback *, btDispatcher *dispatcher)
btBroadphasePair * internalFindPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1, int hash)
btAlignedObjectArray< int > m_hashTable
btOverlappingPairCallback * m_ghostPairCallback
btBroadphasePairArray m_overlappingPairArray
bool equalsPair(const btBroadphasePair &pair, int proxyId1, int proxyId2)
virtual ~btCollisionAlgorithm()
bool needsBroadphaseCollision(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1) const
btOverlappingPairCallback * m_ghostPairCallback
void cleanProxyFromPairs(btBroadphaseProxy *proxy, btDispatcher *dispatcher)
void swap(int index0, int index1)
The btOverlappingPairCache provides an interface for overlapping pair management (add, remove, storage), used by the btBroadphaseInterface broadphases.
virtual void sortOverlappingPairs(btDispatcher *dispatcher)
virtual bool hasDeferredRemoval()
unsigned int getHash(unsigned int proxyId1, unsigned int proxyId2)
int size() const
return the number of elements in the array
btHashedOverlappingPairCache()
btBroadphasePair * internalAddPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
void cleanOverlappingPair(btBroadphasePair &pair, btDispatcher *dispatcher)
btBroadphasePair * addOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
btBroadphasePair * findPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
virtual void freeCollisionAlgorithm(void *ptr)=0
virtual bool processOverlap(btBroadphasePair &pair)=0
void * removeOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1, btDispatcher *dispatcher)
btAlignedObjectArray< int > m_next
btSortedOverlappingPairCache()
The btBroadphaseProxy is the main class that can be used with the Bullet broadphases.
btBroadphaseProxy * m_pProxy1
btCollisionAlgorithm * m_algorithm
int capacity() const
return the pre-allocated (reserved) elements, this is at least as large as the total number of elemen...
virtual void * removeOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1, btDispatcher *dispatcher)
int gOverlappingPairs
btSapBroadphaseArray m_sapBroadphases;
btBroadphasePairArray m_overlappingPairArray
btBroadphaseProxy * m_pProxy0
virtual void sortOverlappingPairs(btDispatcher *dispatcher)
virtual btBroadphasePair * addOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)=0
void resize(int newsize, const T &fillData=T())
int findLinearSearch(const T &key) const
void removeOverlappingPairsContainingProxy(btBroadphaseProxy *proxy, btDispatcher *dispatcher)
virtual btBroadphasePair * addOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
virtual void processAllOverlappingPairs(btOverlapCallback *, btDispatcher *dispatcher)
virtual ~btSortedOverlappingPairCache()
void cleanProxyFromPairs(btBroadphaseProxy *proxy, btDispatcher *dispatcher)
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
T & expandNonInitializing()
btBroadphasePair * findPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
this findPair becomes really slow.
void removeOverlappingPairsContainingProxy(btBroadphaseProxy *proxy, btDispatcher *dispatcher)
void cleanOverlappingPair(btBroadphasePair &pair, btDispatcher *dispatcher)
virtual ~btHashedOverlappingPairCache()
void quickSort(const L &CompareFunc)
virtual void * removeOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1, btDispatcher *dispatcher)=0
The btBroadphasePair class contains a pair of aabb-overlapping objects.