intersectionTest method

void intersectionTest(
  1. Body bodyA,
  2. Body bodyB,
  3. List<Body> pairs1,
  4. List<Body> pairs2,
)

Check if the bounding volumes of two bodies intersect.

Implementation

void intersectionTest(Body bodyA, Body bodyB, List<Body> pairs1, List<Body> pairs2) {
  if (useBoundingBoxes) {
    doBoundingBoxBroadphase(bodyA, bodyB, pairs1, pairs2);
  } else {
    doBoundingSphereBroadphase(bodyA, bodyB, pairs1, pairs2);
  }
}