int SegmentIntersectsSide(Point a, Point b) { var segment = new PointPair(a, b); for (int i = 0; i < N; i++) { Point intersection = Math.GetIntersectionOfSegments(segment, Polygon.GetSegment(i)); if (intersection.Exists() && Polygon[i] != Start && Polygon[i] != End && Polygon[i.RotateNext(N)] != Start && Polygon[i.RotateNext(N)] != End) { return i; } } return -1; }
public RoutingAlgorithmDijkstra(Point start, Point end, List<Point> polygon) : base(start, end, polygon) { }
public RoutingAlgorithmGrahamScan( Point start, Point end, List<Point> polygon) : base(start, end, polygon) { }