46 PX_FORCE_INLINE PxU32 getId0()
const {
return id0_isNew & ~PX_SIGN_BITMASK; }
47 PX_FORCE_INLINE PxU32 getId1()
const {
return id1_isUpdated & ~PX_SIGN_BITMASK; }
49 PX_FORCE_INLINE PxU32 isNew()
const {
return id0_isNew & PX_SIGN_BITMASK; }
50 PX_FORCE_INLINE PxU32 isUpdated()
const {
return id1_isUpdated & PX_SIGN_BITMASK; }
54 PX_ASSERT(!(id0 & PX_SIGN_BITMASK));
55 PX_ASSERT(!(id1 & PX_SIGN_BITMASK));
56 id0_isNew = id0 | PX_SIGN_BITMASK;
62 PX_ASSERT(!(id0 & PX_SIGN_BITMASK));
63 PX_ASSERT(!(id1 & PX_SIGN_BITMASK));
69 PX_FORCE_INLINE void clearUpdated() { id1_isUpdated &= ~PX_SIGN_BITMASK; }
90 return (PxU32((
size_t(pair) -
size_t(mActivePairs)))/
sizeof(
InternalPair));
103 PxU32 offset = mHashTable[hashValue];
104 while(offset!=INVALID_ID && differentPair(activePairs[offset], id0, id1))
106 PX_ASSERT(activePairs[offset].getId0()!=INVALID_USER_ID);
107 offset = next[offset];
109 if(offset==INVALID_ID)
111 PX_ASSERT(offset<mNbActivePairs);
114 return &activePairs[offset];
122 const PxU32 fullHashValue = hash(id0, id1);
123 PxU32 hashValue = fullHashValue & mMask;
135 if(mNbActivePairs >= mHashSize)
136 hashValue = growPairs(fullHashValue);
138 const PxU32 pairIndex = mNbActivePairs++;
141 p->setNewPair(id0, id1);
142 mNext[pairIndex] = mHashTable[hashValue];
143 mHashTable[hashValue] = pairIndex;
149 PxU32 mNbActivePairs;
153 PxU32 mReservedMemory;
158 void reserveMemory(PxU32 memSize);
160 void removePair(PxU32 id0, PxU32 id1, PxU32 hashValue, PxU32 pairIndex);
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39