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); }
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))); }
public bool HasSegment(Segment2D s) { return((s0 == s) || (s1 == s) || (s2 == s)); }
bool ExternalPSLG(Segment2D s) { return(ExternalPSLG(s.Midpoint())); }
public void RemoveTriangle(Segment2D s) { T.FindAll(t => t.HasSegment(s)).ForEach(t => RemoveTriangle(t)); }