testOverlap method

  1. @override
bool testOverlap(
  1. int proxyIdA,
  2. int proxyIdB
)
override

Implementation

@override
bool testOverlap(int proxyIdA, int proxyIdB) {
  final a = _tree.fatAABB(proxyIdA);
  final b = _tree.fatAABB(proxyIdB);
  if (b.lowerBound.x - a.upperBound.x > 0.0 ||
      b.lowerBound.y - a.upperBound.y > 0.0) {
    return false;
  }

  if (a.lowerBound.x - b.upperBound.x > 0.0 ||
      a.lowerBound.y - b.upperBound.y > 0.0) {
    return false;
  }

  return true;
}