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

Method finalizeUpdate

physx/source/lowlevelaabb/src/BpAABBManager.cpp:1676–1709  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1674}
1675
1676void AABBManager::finalizeUpdate(PxU32 numCpuTasks, PxcScratchAllocator* scratchAllocator, PxBaseTask* continuation, PxBaseTask* narrowPhaseUnlockTask)
1677{
1678 PX_PROFILE_ZONE("AABBManager::finalizeUpdate", getContextId());
1679
1680 const bool singleThreaded = gSingleThreaded || numCpuTasks<2;
1681 if(!singleThreaded)
1682 {
1683 const PxU32 size = mDirtyAggregates.size();
1684 for(PxU32 i=0;i<size;i++)
1685 {
1686 Aggregate* aggregate = mDirtyAggregates[i];
1687 mBoundsArray.begin()[aggregate->mIndex] = aggregate->getMergedBounds();
1688 }
1689 }
1690
1691 const BroadPhaseUpdateData updateData( mAddedHandles.begin(), mAddedHandles.size(),
1692 mUpdatedHandles.begin(), mUpdatedHandles.size(),
1693 mRemovedHandles.begin(), mRemovedHandles.size(),
1694 mBoundsArray.begin(), mGroups.begin(),
1695#ifdef BP_FILTERING_USES_TYPE_IN_GROUP
1696 &mLUT[0][0],
1697#endif
1698 mContactDistance.begin(), mBoundsArray.getCapacity(),
1699 mPersistentStateChanged || mBoundsArray.hasChanged());
1700 mPersistentStateChanged = false;
1701
1702 PX_ASSERT(updateData.isValid());
1703
1704 //KS - skip broad phase if there are no updated shapes.
1705 if (updateData.getNumCreatedHandles() != 0 || updateData.getNumRemovedHandles() != 0 || updateData.getNumUpdatedHandles() != 0)
1706 mBroadPhase.update(numCpuTasks, scratchAllocator, updateData, continuation, narrowPhaseUnlockTask);
1707 else
1708 narrowPhaseUnlockTask->removeReference();
1709}
1710
1711static PX_FORCE_INLINE void createOverlap(Ps::Array<AABBOverlap>* overlaps, const Ps::Array<VolumeData>& volumeData, PxU32 id0, PxU32 id1)
1712{

Callers 1

runInternalMethod · 0.80

Calls 11

getNumCreatedHandlesMethod · 0.80
getNumRemovedHandlesMethod · 0.80
getNumUpdatedHandlesMethod · 0.80
getContextIdFunction · 0.50
sizeMethod · 0.45
beginMethod · 0.45
getCapacityMethod · 0.45
hasChangedMethod · 0.45
isValidMethod · 0.45
updateMethod · 0.45
removeReferenceMethod · 0.45

Tested by

no test coverage detected