Distance to ray intersection with a polygon or polyline
The points of the polygon or polyline
Whether the shape is closed (true for polygon, false for polyline)
A point
A vector
The distance to intersection
Distance to ray intersection with a polygon or polyline