| 1027 | |
| 1028 | template<typename T, bool syncOnRemove, bool wakeOnLostTouchCheck> |
| 1029 | void 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 | |
| 1063 | template<typename T> |
| 1064 | void Scb::Scene::processShapeRemoves(ObjectTracker& tracker) |
nothing calls this directly
no test coverage detected