FarseerPhysics.Common.Decomposition.CDT.Delaunay.Sweep.DTSweepContext.RemoveNode C# (CSharp) Method

RemoveNode() public method

public RemoveNode ( AdvancingFrontNode node ) : void
node AdvancingFrontNode
return void
        public void RemoveNode(AdvancingFrontNode node)
        {
            //        Console.WriteLine( "remove:" + node.key + ":" + System.identityHashCode(node.key));
            //        m_nodeTree.delete( node.getKey() );
            aFront.RemoveNode(node);
        }

Usage Example

Example #1
0
        /// <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>
        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);
            }
        }
All Usage Examples Of FarseerPhysics.Common.Decomposition.CDT.Delaunay.Sweep.DTSweepContext::RemoveNode