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

Method fetchQueries

physx/source/physx/src/NpScene.cpp:2964–2996  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2962}
2963
2964bool NpScene::fetchQueries(bool block)
2965{
2966 if(!mSceneQueriesUpdateRunning)
2967 {
2968 //fetchSceneQueries doesn't get called
2969 Ps::getFoundation().error(PxErrorCode::eINVALID_OPERATION, __FILE__, __LINE__,
2970 "PxScene::fetchQueries: fetchQueries() called illegally! It must be called after sceneQueriesUpdate()");
2971 return false;
2972 }
2973
2974 if(!checkSceneQueriesInternal(block))
2975 return false;
2976
2977 {
2978 PX_SIMD_GUARD;
2979
2980 NP_WRITE_CHECK(this);
2981
2982 // we use cross thread profile here, to show the event in cross thread view
2983 // PT: TODO: why do we want to show it in the cross thread view?
2984 PX_PROFILE_START_CROSSTHREAD("Basic.fetchQueries", getContextId());
2985
2986 // flush updates and commit if work is done
2987 mSQManager.flushUpdates();
2988
2989 PX_PROFILE_STOP_CROSSTHREAD("Basic.fetchQueries", getContextId());
2990 PX_PROFILE_STOP_CROSSTHREAD("Basic.sceneQueriesUpdate", getContextId());
2991
2992 mSceneQueriesDone.reset();
2993 mSceneQueriesUpdateRunning = false;
2994 }
2995 return true;
2996}
2997
2998void NpScene::frameEnd()
2999{

Callers

nothing calls this directly

Calls 4

errorMethod · 0.80
flushUpdatesMethod · 0.80
getContextIdFunction · 0.50
resetMethod · 0.45

Tested by

no test coverage detected