if( notLegalized ) tcx.mapTriangleToNodes( t ); tcx.mapTriangleToNodes( ot );
/** * Adds a triangle to the advancing front to fill a hole. * @param tcx * @param node - middle node, that is the bottom of the hole */ 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.addToList( 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 ); } }
tcx.mapTriangleToNodes( n1.triangle ); tcx.mapTriangleToNodes( t1 ); tcx.mapTriangleToNodes( n1.triangle ); tcx.mapTriangleToNodes( t1 );
tcx.mapTriangleToNodes( t ); tcx.mapTriangleToNodes( ot );
tcx.mapTriangleToNodes( triangle );