Exemple #1
0
 public static Coord?HitTestPolygon(PointT point, Coord radius, IEnumerable <PointT> points, IList <int> divisions, out PointT projected)
 {
     if (PolygonMath.GetWindingNumber(points, point) != 0)
     {
         projected = point;
         return(-1);
     }
     else
     {
         return(HitTestPolyline(point, radius, points, divisions, out projected));
     }
 }
Exemple #2
0
 public override object HitTest(PointT point, Coord radius, out PointT projected)
 {
     projected = point;
     if (!BBox.Inflated(radius, radius).Contains(point))
     {
         return(null);
     }
     if (PolygonMath.GetWindingNumber(Points, point) != 0)
     {
         projected = point;
         return(-1);
     }
     return(HitTestPolyline(point, radius, Points, Divisions, out projected));
 }