Notify the broad-phase that a collision shape has moved and need to be updated
| 138 | |
| 139 | // Notify the broad-phase that a collision shape has moved and need to be updated |
| 140 | void BroadPhaseSystem::updateColliderInternal(int32 broadPhaseId, Collider* collider, const AABB& aabb, |
| 141 | bool forceReInsert) { |
| 142 | |
| 143 | assert(broadPhaseId >= 0); |
| 144 | |
| 145 | // Update the dynamic AABB tree according to the movement of the collision shape |
| 146 | bool hasBeenReInserted = mDynamicAABBTree.updateObject(broadPhaseId, aabb, forceReInsert); |
| 147 | |
| 148 | // If the collision shape has moved out of its fat AABB (and therefore has been reinserted |
| 149 | // into the tree). |
| 150 | if (hasBeenReInserted) { |
| 151 | |
| 152 | // Add the collision shape into the array of shapes that have moved (or have been created) |
| 153 | // during the last simulation step |
| 154 | addMovedCollider(broadPhaseId, collider); |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | // Update the broad-phase state of some colliders components |
| 159 | void BroadPhaseSystem::updateCollidersComponents(uint32 startIndex, uint32 nbItems) { |
nothing calls this directly
no test coverage detected