MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / updatePairs

Method updatePairs

physx/source/lowlevelaabb/src/BpAABBManager.cpp:1740–1789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1738}
1739
1740PX_FORCE_INLINE void PersistentPairs::updatePairs( PxU32 timestamp, const PxBounds3* bounds, const float* contactDistances, const Bp::FilterGroup::Enum* groups,
1741#ifdef BP_FILTERING_USES_TYPE_IN_GROUP
1742 const bool* lut,
1743#endif
1744 Ps::Array<VolumeData>& volumeData, Ps::Array<AABBOverlap>* createdOverlaps, Ps::Array<AABBOverlap>* destroyedOverlaps)
1745{
1746 if(mTimestamp==timestamp)
1747 return;
1748
1749 mTimestamp = timestamp;
1750
1751#ifdef BP_FILTERING_USES_TYPE_IN_GROUP
1752 findOverlaps(mPM, bounds, contactDistances, groups, lut);
1753#else
1754 findOverlaps(mPM, bounds, contactDistances, groups);
1755#endif
1756
1757 PxU32 i=0;
1758 PxU32 nbActivePairs = mPM.mNbActivePairs;
1759 while(i<nbActivePairs)
1760 {
1761 InternalPair& p = mPM.mActivePairs[i];
1762 const PxU32 id0 = p.getId0();
1763 const PxU32 id1 = p.getId1();
1764
1765 if(p.isNew())
1766 {
1767 createOverlap(createdOverlaps, volumeData, id0, id1);
1768
1769 p.clearNew();
1770 p.clearUpdated();
1771
1772 i++;
1773 }
1774 else if(p.isUpdated())
1775 {
1776 p.clearUpdated();
1777 i++;
1778 }
1779 else
1780 {
1781 deleteOverlap(destroyedOverlaps, volumeData, id0, id1);
1782
1783 const PxU32 hashValue = hash(id0, id1) & mPM.mMask;
1784 mPM.removePair(id0, id1, hashValue, i);
1785 nbActivePairs--;
1786 }
1787 }
1788 mPM.shrinkMemory();
1789}
1790
1791PersistentActorAggregatePair* AABBManager::createPersistentActorAggregatePair(ShapeHandle volA, ShapeHandle volB)
1792{

Callers 2

updateMethod · 0.80
runInternalMethod · 0.80

Calls 12

createOverlapFunction · 0.85
deleteOverlapFunction · 0.85
isNewMethod · 0.80
clearNewMethod · 0.80
clearUpdatedMethod · 0.80
isUpdatedMethod · 0.80
hashFunction · 0.70
getId0Method · 0.45
getId1Method · 0.45
removePairMethod · 0.45
shrinkMemoryMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected