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

Method fetchResultsPostContactCallbacks

physx/source/physx/src/NpScene.cpp:2058–2109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2056}
2057
2058void NpScene::fetchResultsPostContactCallbacks()
2059{
2060 mScene.postCallbacksPreSync();
2061 mScene.syncEntireScene(); // double buffering
2062
2063 SqRefFinder sqRefFinder;
2064 mScene.getScScene().syncSceneQueryBounds(mSQManager.getDynamicBoundsSync(), sqRefFinder);
2065
2066 mSQManager.updateCompoundActors(mScene.getScScene().getActiveCompoundBodiesArray(), mScene.getScScene().getNumActiveCompoundBodies());
2067 mSQManager.afterSync(getSceneQueryUpdateModeFast());
2068
2069#if PX_SUPPORT_PVD
2070 mScene.getScenePvdClient().updateSceneQueries();
2071
2072 getSingleSqCollector().clear();
2073 getBatchedSqCollector().clear();
2074#endif
2075
2076 // fire sleep and wake-up events
2077 // we do this after buffer-swapping so that the events have the new state
2078 {
2079 PX_PROFILE_ZONE("Sim.fireCallbacksPostSync", getContextId());
2080 mScene.fireCallBacksPostSync();
2081 }
2082
2083 mScene.postReportsCleanup();
2084
2085 // build the list of active actors
2086 {
2087 PX_PROFILE_ZONE("Sim.buildActiveActors", getContextId());
2088
2089 const bool buildActiveActors = mScene.getFlags() & PxSceneFlag::eENABLE_ACTIVE_ACTORS;
2090
2091 if (buildActiveActors && mBuildFrozenActors)
2092 mScene.buildActiveAndFrozenActors();
2093 else if (buildActiveActors)
2094 mScene.buildActiveActors();
2095 }
2096
2097 mRenderBuffer.append(mScene.getScScene().getRenderBuffer());
2098
2099 PX_ASSERT(getSimulationStage() != Sc::SimulationStage::eCOMPLETE);
2100 if (mControllingSimulation)
2101 {
2102 mTaskManager->stopSimulation();
2103 }
2104
2105 setSimulationStage(Sc::SimulationStage::eCOMPLETE);
2106
2107 mPhysicsDone.reset(); // allow Physics to run again
2108 mCollisionDone.reset();
2109}
2110
2111bool NpScene::fetchResults(bool block, PxU32* errorState)
2112{

Callers

nothing calls this directly

Calls 15

postCallbacksPreSyncMethod · 0.80
syncEntireSceneMethod · 0.80
syncSceneQueryBoundsMethod · 0.80
updateCompoundActorsMethod · 0.80
afterSyncMethod · 0.80
updateSceneQueriesMethod · 0.80
getScenePvdClientMethod · 0.80
stopSimulationMethod · 0.80
setSimulationStageFunction · 0.70
getContextIdFunction · 0.50
clearMethod · 0.45
postReportsCleanupMethod · 0.45

Tested by

no test coverage detected