예제 #1
0
 public DelaunayTriangle(TriangulationPoint p1, TriangulationPoint p2, TriangulationPoint p3)
 {
     Points[0] = p1;
     Points[1] = p2;
     Points[2] = p3;
 }
예제 #2
0
 public void SetDelaunayEdgeCW(TriangulationPoint p, bool ce)
 {
     EdgeIsDelaunay[(IndexOf(p) + 1) % 3] = ce;
 }
예제 #3
0
 public void SetDelaunayEdgeAcross(TriangulationPoint p, bool ce)
 {
     EdgeIsDelaunay[IndexOf(p)] = ce;
 }
예제 #4
0
 public bool GetDelaunayEdgeCW(TriangulationPoint p)
 {
     return(EdgeIsDelaunay[(IndexOf(p) + 1) % 3]);
 }
예제 #5
0
 public bool GetDelaunayEdgeAcross(TriangulationPoint p)
 {
     return(EdgeIsDelaunay[IndexOf(p)]);
 }
예제 #6
0
 public void SetConstrainedEdgeCW(TriangulationPoint p, bool ce)
 {
     EdgeIsConstrained[(IndexOf(p) + 1) % 3] = ce;
 }
예제 #7
0
 public void SetConstrainedEdgeAcross(TriangulationPoint p, bool ce)
 {
     EdgeIsConstrained[IndexOf(p)] = ce;
 }
예제 #8
0
 public bool GetConstrainedEdgeCW(TriangulationPoint p)
 {
     return(EdgeIsConstrained[(IndexOf(p) + 1) % 3]);
 }
예제 #9
0
 public bool GetConstrainedEdgeAcross(TriangulationPoint p)
 {
     return(EdgeIsConstrained[IndexOf(p)]);
 }
예제 #10
0
 public TriangulationPoint PointCW(TriangulationPoint point)
 {
     return(Points[(IndexOf(point) + 2) % 3]);
 }
예제 #11
0
 /// <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;
 }
예제 #12
0
 public DelaunayTriangle NeighborAcross(TriangulationPoint point)
 {
     return(Neighbors[Points.IndexOf(point)]);
 }
예제 #13
0
 public DelaunayTriangle NeighborCCW(TriangulationPoint point)
 {
     return(Neighbors[(Points.IndexOf(point) + 2) % 3]);
 }
예제 #14
0
 /// <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)));
 }
예제 #15
0
 public bool Contains(TriangulationPoint p, TriangulationPoint q)
 {
     return(Contains(p) && Contains(q));
 }
예제 #16
0
 public bool Contains(TriangulationPoint p)
 {
     return(p == Points[0] || p == Points[1] || p == Points[2]);
 }