public void createAdvancingFront() { AdvancingFrontNode head, tail, middle; // Initial triangle DelaunayTriangle iTriangle = new DelaunayTriangle(_points[0], getTail(), getHead()); addToList(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(List <Node> nodes) { Triangle triangle = new Triangle(_points[0], _tail, _head); _map.Add(triangle); _af_head = new Node(triangle.Points[1], triangle); _af_middle = new Node(triangle.Points[0], triangle); _af_tail = new Node(triangle.Points[2]); Front = new AdvancingFront(_af_head, _af_tail); // TODO: More intuitive if head is middles next and not previous? // so swap head and tail _af_head.Next = _af_middle; _af_middle.Next = _af_tail; _af_middle.Prev = _af_head; _af_tail.Prev = _af_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]); 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; }