intersectsSegment method

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

Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it is usually more efficient to only call this method if aabbIntersectsSegment(float, float, float, float) returns true.

Implementation

BoundingBoxAttachment? intersectsSegment(double x1, double y1, double x2, double y2) {
  final result = SpineBindings.bindings.spine_skeleton_bounds_intersects_segment_1(_ptr, x1, y1, x2, y2);
  return result.address == 0 ? null : BoundingBoxAttachment.fromPointer(result);
}