MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / computeOverlappingPairs

Method computeOverlappingPairs

src/systems/BroadPhaseSystem.cpp:206–219  ·  view source on GitHub ↗

Compute all the overlapping pairs of collision shapes

Source from the content-addressed store, hash-verified

204
205// Compute all the overlapping pairs of collision shapes
206void 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()

Callers 1

computeBroadPhaseMethod · 0.80

Calls 4

toArrayMethod · 0.80
sizeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected