public DelaunayTriangle(TriangulationPoint p1, TriangulationPoint p2, TriangulationPoint p3) { Points[0] = p1; Points[1] = p2; Points[2] = p3; }
public void SetDelaunayEdgeCW(TriangulationPoint p, bool ce) { EdgeIsDelaunay[(IndexOf(p) + 1) % 3] = ce; }
public void SetDelaunayEdgeAcross(TriangulationPoint p, bool ce) { EdgeIsDelaunay[IndexOf(p)] = ce; }
public bool GetDelaunayEdgeCW(TriangulationPoint p) { return(EdgeIsDelaunay[(IndexOf(p) + 1) % 3]); }
public bool GetDelaunayEdgeAcross(TriangulationPoint p) { return(EdgeIsDelaunay[IndexOf(p)]); }
public void SetConstrainedEdgeCW(TriangulationPoint p, bool ce) { EdgeIsConstrained[(IndexOf(p) + 1) % 3] = ce; }
public void SetConstrainedEdgeAcross(TriangulationPoint p, bool ce) { EdgeIsConstrained[IndexOf(p)] = ce; }
public bool GetConstrainedEdgeCW(TriangulationPoint p) { return(EdgeIsConstrained[(IndexOf(p) + 1) % 3]); }
public bool GetConstrainedEdgeAcross(TriangulationPoint p) { return(EdgeIsConstrained[IndexOf(p)]); }
public TriangulationPoint PointCW(TriangulationPoint point) { return(Points[(IndexOf(point) + 2) % 3]); }
/// <summary> /// Legalize triangle by rotating clockwise around oPoint /// </summary> /// <param name="oPoint">The origin point to rotate around</param> /// <param name="nPoint">???</param> public void Legalize(TriangulationPoint oPoint, TriangulationPoint nPoint) { RotateCW(); Points[IndexCCW(oPoint)] = nPoint; }
public DelaunayTriangle NeighborAcross(TriangulationPoint point) { return(Neighbors[Points.IndexOf(point)]); }
public DelaunayTriangle NeighborCCW(TriangulationPoint point) { return(Neighbors[(Points.IndexOf(point) + 2) % 3]); }
/// <param name="t">Opposite triangle</param> /// <param name="p">The point in t that isn't shared between the triangles</param> public TriangulationPoint OppositePoint(DelaunayTriangle t, TriangulationPoint p) { Debug.Assert(t != this, "self-pointer error"); return(PointCW(t.PointCW(p))); }
public bool Contains(TriangulationPoint p, TriangulationPoint q) { return(Contains(p) && Contains(q)); }
public bool Contains(TriangulationPoint p) { return(p == Points[0] || p == Points[1] || p == Points[2]); }