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

Method postBpStage3

physx/source/lowlevelaabb/src/BpAABBManager.cpp:2297–2431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2295}
2296
2297void AABBManager::postBpStage3(PxBaseTask*)
2298{
2299
2300 {
2301 {
2302 PX_PROFILE_ZONE("SimpleAABBManager::postBroadPhase - aggregate self-collisions", getContextId());
2303 const PxU32 size = mDirtyAggregates.size();
2304 for (PxU32 i = 0; i < size; i++)
2305 {
2306 Aggregate* aggregate = mDirtyAggregates[i];
2307 aggregate->resetDirtyState();
2308
2309 }
2310 resetOrClear(mDirtyAggregates);
2311 }
2312
2313 {
2314 PX_PROFILE_ZONE("SimpleAABBManager::postBroadPhase - append pairs", getContextId());
2315
2316 for (PxU32 a = 0; a < mAggPairTasks.size(); ++a)
2317 {
2318 ProcessAggPairsBase* task = mAggPairTasks[a];
2319 for (PxU32 t = 0; t < 2; t++)
2320 {
2321 for (PxU32 i = 0, startIdx = task->mCreatedPairs[t].mStartIdx; i < task->mCreatedPairs[t].mCount; ++i)
2322 {
2323 mCreatedOverlaps[t].pushBack((*task->mCreatedPairs[t].mArray)[i + startIdx]);
2324 }
2325 for (PxU32 i = 0, startIdx = task->mDestroyedPairs[t].mStartIdx; i < task->mDestroyedPairs[t].mCount; ++i)
2326 {
2327 mDestroyedOverlaps[t].pushBack((*task->mDestroyedPairs[t].mArray)[i + startIdx]);
2328 }
2329 }
2330 }
2331
2332 mAggPairTasks.forceSize_Unsafe(0);
2333
2334
2335 Ps::InlineArray<BpCacheData*, 16> bpCache;
2336 BpCacheData* entry = static_cast<BpCacheData*>(mBpThreadContextPool.pop());
2337
2338 while (entry)
2339 {
2340 entry->reset();
2341 bpCache.pushBack(entry);
2342 entry = static_cast<BpCacheData*>(mBpThreadContextPool.pop());
2343 }
2344
2345 //Now reinsert back into queue...
2346 for (PxU32 i = 0; i < bpCache.size(); ++i)
2347 {
2348 mBpThreadContextPool.push(*bpCache[i]);
2349 }
2350 }
2351 }
2352
2353 {
2354 PX_PROFILE_ZONE("AABBManager::postBroadPhase - process created pairs", getContextId());

Callers

nothing calls this directly

Calls 15

resetDirtyStateMethod · 0.80
getOutOfBoundsObjectsMethod · 0.80
isSingleActorMethod · 0.80
resetOrClearFunction · 0.70
getContextIdFunction · 0.50
PairClass · 0.50
sizeMethod · 0.45
pushBackMethod · 0.45
forceSize_UnsafeMethod · 0.45
popMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected