Пример #1
0
 public Arc(Point2 head, Point2 body, Point2 tail)
 {
     Head = head;
     Body = body;
     Tail = tail;
 }
Пример #2
0
        public static bool IsSegmentsProperIntersection(Point2 a1, Point2 a2, Point2 b1, Point2 b2)
        {
            double c1 = Vector2.Cross(a2 - a1, b1 - a1),
                   c2 = Vector2.Cross(a2 - a1, b2 - a1),
                   c3 = Vector2.Cross(b2 - b1, a1 - b1),
                   c4 = Vector2.Cross(b2 - b1, a2 - b1);

            return(c1.DCompareTo(0) * c2.DCompareTo(0) < 0 && c3.CompareTo(0) * c4.DCompareTo(0) < 0);
        }
Пример #3
0
 private DirectedSegment2(DirectedSegment2 ds)
 {
     P1 = ds.P1;
     P2 = ds.P2;
 }
Пример #4
0
        public bool Contains(Point2 p, double eps = Constants.DEFAULT_EPS)
        {
            var d = p.DistanceTo(this);

            return(p.DistanceTo(this).Near(0, eps));
        }
Пример #5
0
 public DirectedSegment2(Point2 p1, Point2 p2)
 {
     P1 = p1;
     P2 = p2;
 }