| 5342 | } |
| 5343 | |
| 5344 | PX_INLINE void Sc::Scene::cleanUpSleepBodies() |
| 5345 | { |
| 5346 | BodyCore* const* bodyArray = mSleepBodies.getEntries(); |
| 5347 | PxU32 bodyCount = mSleepBodies.size(); |
| 5348 | |
| 5349 | IG::IslandSim& islandSim = mSimpleIslandManager->getAccurateIslandSim(); |
| 5350 | |
| 5351 | while (bodyCount--) |
| 5352 | { |
| 5353 | BodySim* body = bodyArray[bodyCount]->getSim(); |
| 5354 | |
| 5355 | if (body->readInternalFlag(static_cast<BodySim::InternalFlags>(BodySim::BF_WAKEUP_NOTIFY))) |
| 5356 | { |
| 5357 | body->clearInternalFlag(static_cast<BodySim::InternalFlags>(BodySim::BF_IS_IN_WAKEUP_LIST)); |
| 5358 | mSleepBodies.erase(bodyArray[bodyCount]); |
| 5359 | } |
| 5360 | else if (islandSim.getNode(body->getNodeIndex()).isActive()) |
| 5361 | { |
| 5362 | //This body is still active in the island simulation, so the request to deactivate the actor by the application must have failed. Recover by undoing this |
| 5363 | mSleepBodies.erase(bodyArray[bodyCount]); |
| 5364 | body->internalWakeUp(); |
| 5365 | } |
| 5366 | } |
| 5367 | |
| 5368 | mSleepBodyListValid = true; |
| 5369 | } |
| 5370 | |
| 5371 | PX_INLINE void Sc::Scene::cleanUpWokenBodies() |
| 5372 | { |
nothing calls this directly
no test coverage detected