Compute all the overlapping pairs of collision shapes
| 204 | |
| 205 | // Compute all the overlapping pairs of collision shapes |
| 206 | void BroadPhaseSystem::computeOverlappingPairs(MemoryManager& memoryManager, Array<Pair<int32, int32>>& overlappingNodes) { |
| 207 | |
| 208 | RP3D_PROFILE("BroadPhaseSystem::computeOverlappingPairs()", mProfiler); |
| 209 | |
| 210 | // Get the array of the colliders that have moved or have been created in the last frame |
| 211 | Array<int> shapesToTest = mMovedShapes.toArray(memoryManager.getHeapAllocator()); |
| 212 | |
| 213 | // Ask the dynamic AABB tree to report all collision shapes that overlap with the shapes to test |
| 214 | mDynamicAABBTree.reportAllShapesOverlappingWithShapes(shapesToTest, 0, static_cast<uint32>(shapesToTest.size()), overlappingNodes); |
| 215 | |
| 216 | // Reset the array of collision shapes that have move (or have been created) during the |
| 217 | // last simulation step |
| 218 | mMovedShapes.clear(); |
| 219 | } |
| 220 | |
| 221 | // Called when a overlapping node has been found during the call to |
| 222 | // DynamicAABBTree:reportAllShapesOverlappingWithAABB() |
no test coverage detected