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

Method processRemoves

physx/source/physx/src/buffering/ScbScene.cpp:1029–1061  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1027
1028template<typename T, bool syncOnRemove, bool wakeOnLostTouchCheck>
1029void Scb::Scene::processRemoves(ObjectTracker& tracker)
1030{
1031#if PX_SUPPORT_PVD
1032 bool isPvdValid = mScenePvdClient.checkPvdDebugFlag();
1033#endif
1034 typedef ScSceneFns<T> Fns;
1035 for(PxU32 i=0; i < tracker.getBufferedCount(); i++)
1036 {
1037 T* v = static_cast<T*>(tracker.getBuffered()[i]);
1038 if(v->getControlState() == ControlState::eREMOVE_PENDING)
1039 {
1040 bool wakeOnLostTouch = false;
1041 if (wakeOnLostTouchCheck)
1042 {
1043 PX_ASSERT( (v->getScbType() == ScbType::eBODY) ||
1044 (v->getScbType() == ScbType::eBODY_FROM_ARTICULATION_LINK) ||
1045 (v->getScbType() == ScbType::eRIGID_STATIC) );
1046 wakeOnLostTouch = (v->Base::isBuffered(RigidObjectBuffer::BF_WakeTouching) != 0); // important to use Scb::Base::isBuffered() because Scb::Body, for example, has a shadowed implementation of this method
1047 }
1048
1049 Fns::remove(mScene, *v, wakeOnLostTouch);
1050
1051 // if no object param has been updated, the state sync still needs to be processed to write simulation results
1052 // back to the permanently buffered params.
1053 if (syncOnRemove && !(v->getControlFlags() & ControlFlag::eIS_UPDATED))
1054 v->syncState();
1055#if PX_SUPPORT_PVD
1056 if(isPvdValid)
1057 PvdFns<T>::releaseInstance(*this, mScenePvdClient, v);
1058#endif
1059 }
1060 }
1061}
1062
1063template<typename T>
1064void Scb::Scene::processShapeRemoves(ObjectTracker& tracker)

Callers

nothing calls this directly

Calls 5

removeFunction · 0.85
checkPvdDebugFlagMethod · 0.80
getBufferedCountMethod · 0.80
getBufferedMethod · 0.80
syncStateMethod · 0.45

Tested by

no test coverage detected