intersectsPoint method

  1. @override
bool intersectsPoint(
  1. Position point
)
override

Returns true if this bounding box intesects with point.

X ja y (or lon and lat) are always compared on intersection calculation.

This and point must equal on is3D and isMeasured properties. Z (or elev) is further compared when both has z coordinates, and m is compared when both has m coordinates.

Implementation

@override
bool intersectsPoint(Position point) {
  if (point is Geographic && spansAntimeridian) {
    for (final box1 in splitGeographically()) {
      if (Box.testIntersectsPoint(box1, point)) {
        return true;
      }
    }
    return false;
  } else {
    return Box.testIntersectsPoint(this, point);
  }
}