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

Method processBatch

physx/source/simulationcontroller/src/ScScene.cpp:5954–5973  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5952 struct Local
5953 {
5954 static void processBatch(const PxU32 createdCurrIdx, PxU32& createdStartIdx, const PxU32 suppressedCurrIdx, PxU32& suppressedStartIdx, const PxU32 batchSize,
5955 PxsContext* const context, NPhaseCore* const core, OnOverlapCreatedTask* const createTask, PxBaseTask* const continuation_,
5956 PxsContactManager** const cms_, Sc::ShapeInteraction** const shapeInter_, Sc::ElementInteractionMarker** const markerIter_)
5957 {
5958 const PxU32 nbToCreate = createdCurrIdx - createdStartIdx;
5959 const PxU32 nbToSuppress = suppressedCurrIdx - suppressedStartIdx;
5960
5961 context->getContactManagerPool().preallocate(nbToCreate, cms_ + createdStartIdx);
5962 for(PxU32 i=0; i<nbToCreate; ++i)
5963 shapeInter_[createdStartIdx + i] = core->mShapeInteractionPool.allocate();
5964 for(PxU32 i=0; i<nbToSuppress; ++i)
5965 markerIter_[suppressedStartIdx + i] = core->mInteractionMarkerPool.allocate();
5966
5967 createdStartIdx = createdCurrIdx;
5968 suppressedStartIdx = suppressedCurrIdx;
5969
5970 createTask->mNbToProcess = batchSize;
5971 createTask->setContinuation(continuation_);
5972 createTask->removeReference();
5973 }
5974 };
5975
5976 // PT: TODO: why do we create the task immediately? Why not create it only when a batch is full?

Callers

nothing calls this directly

Calls 4

setContinuationMethod · 0.80
preallocateMethod · 0.45
allocateMethod · 0.45
removeReferenceMethod · 0.45

Tested by

no test coverage detected