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

Method syncState

physx/source/physx/src/buffering/ScbScene.cpp:796–842  ·  view source on GitHub ↗

-------------------------------------------------------------- Data synchronization --------------------------------------------------------------

Source from the content-addressed store, hash-verified

794//
795//--------------------------------------------------------------
796void Scb::Scene::syncState()
797{
798 //process client creation -- must be done before BF_CLIENT_BEHAVIOR_FLAGS processing in the below block:
799 while(mBufferedData.mNumClientsCreated)
800 {
801 mScene.createClient();
802 mBufferedData.mNumClientsCreated--;
803 }
804
805 if(mBufferFlags)
806 {
807 if(isBuffered(BF_GRAVITY))
808 mScene.setGravity(mBufferedData.mGravity);
809
810 if(isBuffered(BF_BOUNCETHRESHOLDVELOCITY))
811 mScene.setBounceThresholdVelocity(mBufferedData.mBounceThresholdVelocity);
812
813 if(isBuffered(BF_FLAGS))
814 mScene.setPublicFlags(mBufferedData.mFlags);
815
816 if(isBuffered(BF_DOMINANCE_PAIRS))
817 mBufferedData.syncDominancePairs(mScene);
818
819 if(isBuffered(BF_SOLVER_BATCH_SIZE))
820 mScene.setSolverBatchSize(mBufferedData.mSolverBatchSize);
821
822 if(isBuffered(BF_VISUALIZATION))
823 {
824 for(PxU32 i=0; i<PxVisualizationParameter::eNUM_VALUES; i++)
825 {
826 if(mBufferedData.mVisualizationParamChanged[i])
827 mScene.setVisualizationParameter(PxVisualizationParameter::Enum(i), mBufferedData.mVisualizationParam[i]);
828 }
829
830 mBufferedData.clearVisualizationParams();
831 }
832
833 if(isBuffered(BF_CULLING_BOX))
834 mScene.setVisualizationCullingBox(mBufferedData.mVisualizationCullingBox);
835
836#if PX_SUPPORT_PVD
837 if(mScenePvdClient.checkPvdDebugFlag())
838 mScenePvdClient.updatePvdProperties();
839#endif
840 mBufferFlags = 0;
841 }
842}
843
844template<typename T>
845void Scb::Scene::processUserUpdates(ObjectTracker &tracker)

Callers 5

processUserUpdatesMethod · 0.45
processSimUpdatesMethod · 0.45
syncEntireSceneMethod · 0.45
processRemovesMethod · 0.45
processPendingRemoveMethod · 0.45

Calls 12

setPublicFlagsMethod · 0.80
syncDominancePairsMethod · 0.80
checkPvdDebugFlagMethod · 0.80
EnumEnum · 0.70
createClientMethod · 0.45
setGravityMethod · 0.45
setSolverBatchSizeMethod · 0.45
updatePvdPropertiesMethod · 0.45

Tested by

no test coverage detected