intersectsSegment method

BoundingBoxAttachment? intersectsSegment(
  1. double x1,
  2. double y1,
  3. double x2,
  4. double y2,
)

Implementation

BoundingBoxAttachment? intersectsSegment(
    double x1, double y1, double x2, double y2) {
  final List<Float32List> polygons = this.polygons;
  final int n = polygons.length;
  for (int i = 0; i < n; i++) {
    if (intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2)) {
      return boundingBoxes[i];
    }
  }
  return null;
}