testOverlap method

bool testOverlap(
  1. Shape shapeA,
  2. int indexA,
  3. Shape shapeB,
  4. int indexB,
  5. Transform xfA,
  6. Transform xfB
)

Determine if two generic shapes overlap.

Implementation

bool testOverlap(Shape shapeA, int indexA, Shape shapeB, int indexB,
    Transform xfA, Transform xfB) {
  _input.proxyA.set(shapeA, indexA);
  _input.proxyB.set(shapeB, indexB);
  _input.transformA.set(xfA);
  _input.transformB.set(xfB);
  _input.useRadii = true;

  _cache.count = 0;

  _pool.getDistance().distance(_output, _cache, _input);
  // djm note: anything significant about 10.0f?
  return _output.distance < 10.0 * Settings.EPSILON;
}