| 1071 | } |
| 1072 | |
| 1073 | void Scb::Scene::processPendingRemove() |
| 1074 | { |
| 1075 | processShapeRemoves<Scb::RigidStatic>(mRigidStaticManager); |
| 1076 | processShapeRemoves<Scb::Body>(mBodyManager); |
| 1077 | |
| 1078 | processRemoves<Scb::Constraint, tSyncOnRemove, !tWakeOnLostTouchCheck>(mConstraintManager); |
| 1079 | |
| 1080 | Scb::Base *const * buffered = mConstraintManager.getBuffered(); |
| 1081 | for(PxU32 i=0; i < mConstraintManager.getBufferedCount(); i++) |
| 1082 | { |
| 1083 | Scb::Constraint* constraint = static_cast<Scb::Constraint*>(buffered[i]); |
| 1084 | |
| 1085 | if(constraint->getControlFlags() & ControlFlag::eIS_UPDATED) |
| 1086 | constraint->prepareForActorRemoval(); // see comments in Scb::Constraint |
| 1087 | } |
| 1088 | |
| 1089 | processRemoves<Scb::ArticulationJoint, !tSyncOnRemove, !tWakeOnLostTouchCheck> (mArticulationJointManager); |
| 1090 | processRemoves<Scb::RigidStatic, !tSyncOnRemove, tWakeOnLostTouchCheck> (mRigidStaticManager); |
| 1091 | processRemoves<Scb::Body, tSyncOnRemove, tWakeOnLostTouchCheck> (mBodyManager); |
| 1092 | processRemoves<Scb::Articulation, tSyncOnRemove, !tWakeOnLostTouchCheck> (mArticulationManager); |
| 1093 | |
| 1094 | // Do after actors have been removed (coumpound can only be removed after all its elements are gone) |
| 1095 | for(PxU32 i=0; i < mAggregateManager.getBufferedCount(); i++) |
| 1096 | { |
| 1097 | Aggregate* a = static_cast<Aggregate*>(mAggregateManager.getBuffered()[i]); |
| 1098 | |
| 1099 | if(a->getControlState() == ControlState::eREMOVE_PENDING) |
| 1100 | { |
| 1101 | a->syncState(*this); // Clears the aggregate ID for all actors of the aggregate |
| 1102 | mScene.deleteAggregate(a->getAggregateID()); |
| 1103 | |
| 1104 | #if PX_SUPPORT_PVD |
| 1105 | mScenePvdClient.releasePvdInstance(a); |
| 1106 | #endif |
| 1107 | } |
| 1108 | } |
| 1109 | } |
| 1110 | |
| 1111 | void Scb::Scene::scheduleForUpdate(Scb::Base& object) |
| 1112 | { |
no test coverage detected