20 #ifdef BT_DEBUG_COLLISION_PAIRS 21 int gOverlappingSimplePairs = 0;
22 int gRemoveSimplePairs = 0;
23 int gAddedSimplePairs = 0;
24 int gFindSimplePairs = 0;
25 #endif //BT_DEBUG_COLLISION_PAIRS 29 int initialAllocatedSize = 2;
44 int initialAllocatedSize = 2;
51 #ifdef BT_DEBUG_COLLISION_PAIRS 97 for (i = 0; i < newCapacity; ++i)
101 for (i = 0; i < newCapacity; ++i)
106 for (i = 0; i < curHashtableSize; i++)
135 if (oldCapacity < newCapacity)
154 #ifdef BT_DEBUG_COLLISION_PAIRS 155 gRemoveSimplePairs++;
179 while (index != pairIndex)
202 if (lastPairIndex == pairIndex)
217 while (index != lastPairIndex)
unsigned int getHash(unsigned int indexA, unsigned int indexB)
btSimplePair * internalFindPair(int proxyIdA, int proxyIdB, int hash)
void clear()
clear the array, deallocated memory. Generally it is better to use array.resize(0), to reduce performance overhead of run-time memory (de)allocations.
btHashedSimplePairCache()
const int BT_SIMPLE_NULL_PAIR
int capacity() const
return the pre-allocated (reserved) elements, this is at least as large as the total number of elemen...
btAlignedObjectArray< int > m_hashTable
int size() const
return the number of elements in the array
bool equalsPair(const btSimplePair &pair, int indexA, int indexB)
void resize(int newsize, const T &fillData=T())
btSimplePair * findPair(int indexA, int indexB)
virtual ~btHashedSimplePairCache()
btAlignedObjectArray< int > m_next
T & expandNonInitializing()
virtual void * removeOverlappingPair(int indexA, int indexB)
btSimplePairArray m_overlappingPairArray
btSimplePair * internalAddPair(int indexA, int indexB)