Esempio n. 1
0
        public Segment2D CheckAndAddSegment(Vertex2D a, Vertex2D b)
        {
            var       idx = FindSegment(a, b, E);
            Segment2D s;

            if (idx < 0)
            {
                s = new Segment2D(a, b);
                E.Add(s);
            }
            else
            {
                s = E[idx];
            }
            s.Increment();
            return(s);
        }
Esempio n. 2
0
 public static bool CheckEqual(Segment2D s0, Segment2D s1)
 {
     return
         ((CheckEqual(s0.a, s1.a) && CheckEqual(s0.b, s1.b)) ||
          (CheckEqual(s0.a, s1.b) && CheckEqual(s0.b, s1.a)));
 }
Esempio n. 3
0
 public bool HasSegment(Segment2D s)
 {
     return((s0 == s) || (s1 == s) || (s2 == s));
 }
Esempio n. 4
0
 bool ExternalPSLG(Segment2D s)
 {
     return(ExternalPSLG(s.Midpoint()));
 }
Esempio n. 5
0
 public void RemoveTriangle(Segment2D s)
 {
     T.FindAll(t => t.HasSegment(s)).ForEach(t => RemoveTriangle(t));
 }