public void CreateAdvancingFront() { AdvancingFrontNode head, tail, middle; // Initial triangle DelaunayTriangle dtri = new DelaunayTriangle(Points[0], Tail, Head); Triangles.Add(dtri); head = new AdvancingFrontNode(dtri.P1); head.Triangle = dtri; middle = new AdvancingFrontNode(dtri.P0); middle.Triangle = dtri; tail = new AdvancingFrontNode(dtri.P2); Front = new AdvancingFront(head, tail); //Front.AddNode(middle); // TODO: I think it would be more intuitive if head is middles next and not previous //so swap head and tail Front.Head.Next = middle; middle.Next = Front.Tail; middle.Prev = Front.Head; Front.Tail.Prev = middle; }
public void CreateAdvancingFront() { AdvancingFrontNode head, tail, middle; // Initial triangle DelaunayTriangle iTriangle = new DelaunayTriangle(Points[0], Tail, Head); Triangles.Add(iTriangle); head = new AdvancingFrontNode(iTriangle.Points[1]); head.Triangle = iTriangle; middle = new AdvancingFrontNode(iTriangle.Points[0]); middle.Triangle = iTriangle; tail = new AdvancingFrontNode(iTriangle.Points[2]); aFront = new AdvancingFront(head, tail); aFront.AddNode(middle); // TODO: I think it would be more intuitive if head is middles next and not previous // so swap head and tail aFront.Head.Next = middle; middle.Next = aFront.Tail; middle.Prev = aFront.Head; aFront.Tail.Prev = middle; }
public void CreateAdvancingFront() { // Initial triangle DelaunayTriangle iTriangle = new DelaunayTriangle(Points[0], Tail, Head); Triangles.Add(iTriangle); AdvancingFrontNode head = new AdvancingFrontNode(iTriangle.Points[1]) { Triangle = iTriangle }; AdvancingFrontNode middle = new AdvancingFrontNode(iTriangle.Points[0]) { Triangle = iTriangle }; AdvancingFrontNode tail = new AdvancingFrontNode(iTriangle.Points[2]); Front = new AdvancingFront(head, tail) { Head = { Next = middle } }; // TODO: I think it would be more intuitive if head is middles next and not previous // so swap head and tail middle.Next = Front.Tail; middle.Prev = Front.Head; Front.Tail.Prev = middle; }
public void CreateAdvancingFront() { AdvancingFrontNode head, tail, middle; // Initial triangle DelaunayTriangle iTriangle = new DelaunayTriangle(Points[0], Tail, Head); Triangles.Add(iTriangle); head = new AdvancingFrontNode(iTriangle.Points[1]); head.Triangle = iTriangle; middle = new AdvancingFrontNode(iTriangle.Points[0]); middle.Triangle = iTriangle; tail = new AdvancingFrontNode(iTriangle.Points[2]); aFront = new AdvancingFront(head, tail); aFront.AddNode(middle); // TODO: I think it would be more intuitive if head is middles next and not previous // so swap head and tail aFront.Head.Next = middle; middle.Next = aFront.Tail; middle.Prev = aFront.Head; aFront.Tail.Prev = middle; }