PxSceneQueryUpdateMode
Defined in include/PxSceneQueryDesc.h
-
struct PxSceneQueryUpdateMode
Scene query update mode.
This enum controls what work is done when the scene query system is updated. The updates traditionally happen when PxScene::fetchResults is called. This function then calls PxSceneQuerySystem::finalizeUpdates, where the update mode is used.
fetchResults/finalizeUpdates will sync changed bounds during simulation and update the scene query bounds in pruners, this work is mandatory.
eBUILD_ENABLED_COMMIT_ENABLED does allow to execute the new AABB tree build step during fetchResults/finalizeUpdates, additionally the pruner commit is called where any changes are applied. During commit PhysX refits the dynamic scene query tree and if a new tree was built and the build finished the tree is swapped with current AABB tree.
eBUILD_ENABLED_COMMIT_DISABLED does allow to execute the new AABB tree build step during fetchResults/finalizeUpdates. Pruner commit is not called, this means that refit will then occur during the first scene query following fetchResults/finalizeUpdates, or may be forced by the method PxScene::flushQueryUpdates() / PxSceneQuerySystemBase::flushUpdates().
eBUILD_DISABLED_COMMIT_DISABLED no further scene query work is executed. The scene queries update needs to be called manually, see PxScene::sceneQueriesUpdate (see that function’s doc for the equivalent PxSceneQuerySystem sequence). It is recommended to call PxScene::sceneQueriesUpdate right after fetchResults/finalizeUpdates as the pruning structures are not updated.