本文整理匯總了C#中Poly2Tri.DTSweepContext.RemoveNode方法的典型用法代碼示例。如果您正苦於以下問題:C# DTSweepContext.RemoveNode方法的具體用法?C# DTSweepContext.RemoveNode怎麽用?C# DTSweepContext.RemoveNode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Poly2Tri.DTSweepContext
的用法示例。
在下文中一共展示了DTSweepContext.RemoveNode方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Fill
/// <summary>
/// Adds a triangle to the advancing front to fill a hole.
/// </summary>
/// <param name="tcx"></param>
/// <param name="node">middle node, that is the bottom of the hole</param>
private static void Fill(DTSweepContext tcx, AdvancingFrontNode node)
{
DelaunayTriangle triangle = new DelaunayTriangle(node.Prev.Point, node.Point, node.Next.Point);
// TODO: should copy the cEdge value from neighbor triangles
// for now cEdge values are copied during the legalize
triangle.MarkNeighbor(node.Prev.Triangle);
triangle.MarkNeighbor(node.Triangle);
tcx.Triangles.Add(triangle);
// Update the advancing front
node.Prev.Next = node.Next;
node.Next.Prev = node.Prev;
tcx.RemoveNode(node);
// If it was legalized the triangle has already been mapped
if (!Legalize(tcx, triangle)) tcx.MapTriangleToNodes(triangle);
}