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

Method postUpdate

physx/source/lowlevelaabb/src/BpBroadPhaseSap.cpp:639–682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

637}
638
639void BroadPhaseSap::postUpdate()
640{
641 PX_PROFILE_ZONE("BroadPhase.SapPostUpdate", mContextID);
642
643 DataArray da(mData, mDataSize, mDataCapacity);
644
645 for(PxU32 i=0;i<3;i++)
646 {
647 const PxU32 numPairs=mBatchUpdateTasks[i].getPairsSize();
648 const BroadPhasePair* PX_RESTRICT pairs=mBatchUpdateTasks[i].getPairs();
649 for(PxU32 j=0;j<numPairs;j++)
650 {
651 const BroadPhasePair& pair=pairs[j];
652 const BpHandle volA=pair.mVolA;
653 const BpHandle volB=pair.mVolB;
654 if(volA > volB)
655 addPair(volA, volB, mScratchAllocator, mPairs, da);
656 else
657 removePair(volA, volB, mScratchAllocator, mPairs, da);
658 }
659 }
660
661 mData = da.mData;
662 mDataSize = da.mSize;
663 mDataCapacity = da.mCapacity;
664
665 batchCreate();
666
667 //Compute the lists of created and deleted overlap pairs.
668
669 ComputeCreatedDeletedPairsLists(
670 mBoxGroups,
671 mData,mDataSize,
672 mScratchAllocator,
673 mCreatedPairsArray,mCreatedPairsSize,mCreatedPairsCapacity,
674 mDeletedPairsArray,mDeletedPairsSize,mDeletedPairsCapacity,
675 mActualDeletedPairSize,
676 mPairs);
677
678 //DeletePairsLists(mActualDeletedPairSize, mDeletedPairsArray, mPairs);
679
680 PX_ASSERT(isSelfConsistent());
681 mBoxesSizePrev=mBoxesSize;
682}
683
684void BroadPhaseSap::deletePairs()
685{

Callers

nothing calls this directly

Calls 5

addPairFunction · 0.85
removePairFunction · 0.85
getPairsSizeMethod · 0.80
getPairsMethod · 0.80

Tested by

no test coverage detected