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

Method substepDone

physx/samples/samplebase/SampleStepper.cpp:119–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void MultiThreadStepper::substepDone(StepperTask* ownerTask)
120{
121 mSample->onSubstepPreFetchResult();
122
123 {
124#if !PX_PROFILE
125 PxSceneWriteLock writeLock(*mScene);
126#endif
127 mScene->fetchResults(true);
128 }
129
130 PxReal delta = (PxReal)mTimer.getElapsedSeconds();
131 mSimulationTime += delta;
132
133 mSample->onSubstep(mSubStepSize);
134
135 if(mCurrentSubStep>=mNbSubSteps)
136 {
137 mSync->set();
138 }
139 else
140 {
141 StepperTask &s = ownerTask == &mCompletion0 ? mCompletion1 : mCompletion0;
142 s.setContinuation(*mScene->getTaskManager(), NULL);
143 mCurrentSubStep++;
144
145 mTimer.getElapsedSeconds();
146
147 substep(s);
148
149 // after the first substep, completions run freely
150 s.removeReference();
151 }
152}
153
154
155void MultiThreadStepper::substep(StepperTask& completionTask)

Callers 1

runMethod · 0.80

Calls 8

fetchResultsMethod · 0.80
setContinuationMethod · 0.80
getElapsedSecondsMethod · 0.45
onSubstepMethod · 0.45
setMethod · 0.45
getTaskManagerMethod · 0.45
removeReferenceMethod · 0.45

Tested by

no test coverage detected