Remove a collider from the broad-phase collision detection
| 98 | |
| 99 | // Remove a collider from the broad-phase collision detection |
| 100 | void BroadPhaseSystem::removeCollider(Collider* collider) { |
| 101 | |
| 102 | assert(collider->getBroadPhaseId() != -1); |
| 103 | |
| 104 | int broadPhaseID = collider->getBroadPhaseId(); |
| 105 | |
| 106 | mCollidersComponents.setBroadPhaseId(collider->getEntity(), -1); |
| 107 | |
| 108 | // Remove the collision shape from the dynamic AABB tree |
| 109 | mDynamicAABBTree.removeObject(broadPhaseID); |
| 110 | |
| 111 | // Remove the collision shape into the array of shapes that have moved (or have been created) |
| 112 | // during the last simulation step |
| 113 | removeMovedCollider(broadPhaseID); |
| 114 | } |
| 115 | |
| 116 | // Update the broad-phase state of a single collider |
| 117 | void BroadPhaseSystem::updateCollider(Entity colliderEntity) { |
nothing calls this directly
no test coverage detected