Update whether the body has at least one simulation provider
| 464 | |
| 465 | // Update whether the body has at least one simulation provider |
| 466 | void Body::updateHasSimulationCollider() { |
| 467 | |
| 468 | // For each collider of the body |
| 469 | const uint32 bodyIndex = mWorld.mBodyComponents.getEntityIndex(mEntity); |
| 470 | const Array<Entity>& colliderEntities = mWorld.mBodyComponents.mColliders[bodyIndex]; |
| 471 | for (uint32 i=0; i < colliderEntities.size(); i++) { |
| 472 | |
| 473 | // Get the currently overlapping pairs for this collider |
| 474 | const bool isSimulationCollider = mWorld.mCollidersComponents.getIsSimulationCollider(colliderEntities[i]); |
| 475 | |
| 476 | if (isSimulationCollider) { |
| 477 | mWorld.mBodyComponents.mHasSimulationCollider[bodyIndex] = true; |
| 478 | return; |
| 479 | } |
| 480 | } |
| 481 | } |
| 482 | |
| 483 | #ifdef IS_RP3D_PROFILING_ENABLED |
| 484 |
no test coverage detected