LineIntersectableType

public protocol LineIntersectableType : GeometricType

Protocol for general geometric types that can be intersected with lines.

  • The vector type associated with this LineIntersectableType.

    Declaration

    Swift

    associatedtype Vector : VectorType
  • Performs an intersection test against the given line, returning a list of points representing the entrance and exit intersections against this shape’s outer perimeter.

    The resulting intersection list is ordered by the order of occurrence of each intersection relative to the line’s starting position.

    Declaration

    Swift

    func intersections<Line>(with line: Line) -> LineIntersection<Vector> where Line : LineFloatingPoint, Self.Vector == Line.Vector