Intersectable
public protocol Intersectable : AnyObject, Shape
Any shape that can calculate points of intersection between itself and a Line
or Vector
-
Find any intersection points between the receiver and the specified line
Declaration
Swift
func intersections(with otherShape: Intersectable) -> [Vector]
Parameters
line
Line to intersect
-
lineSegments(_:
Default implementationfirstOnly: )
-
lineIntersection(startPoint:
Extension methodendPoint: ) Find any intersection points between the receiver and the specified line
Declaration
Parameters
startPoint
Starting point of the Line
endPoint
Ending point of the Line
Return Value
An array of intersection points
-
lineSegments(startPoint:
Extension methodendPoint: firstOnly: )
-
pointsDistributed(every:
Extension methodstarting: ending: )