MeshClean() public method

public MeshClean ( DelaunayTriangle triangle ) : void
triangle DelaunayTriangle
return void
Esempio n. 1
0
        private static void FinalizationPolygon(DTSweepContext tcx)
        {
            // Get an Internal triangle to start with
            DelaunayTriangle   t = tcx.aFront.Head.Next.Triangle;
            TriangulationPoint p = tcx.aFront.Head.Next.Point;

            while (!t.GetConstrainedEdgeCW(p))
            {
                t = t.NeighborCCW(p);
            }

            // Collect interior triangles constrained by edges
            tcx.MeshClean(t);
        }
Esempio n. 2
0
        /// <summary>
        /// NOTE: WORK IN PROGRESS - for now this will just clean out all triangles from
        /// inside the outermost holes without paying attention to holes within holes..
        /// hence the work in progress :)
        ///
        /// Removes triangles inside "holes" (that are not inside of other holes already)
        ///
        /// In the example below, assume that triangle ABC is a user-defined "hole".  Thus
        /// any triangles inside it (that aren't inside yet another user-defined hole inside
        /// triangle ABC) should get removed.  In this case, since there are no user-defined
        /// holes inside ABC, we would remove triangles ADE, BCE, and CDE.  We would also
        /// need to combine the appropriate edges so that we end up with just triangle ABC
        ///
        ///          E
        /// A +------+-----+ B              A +-----------+ B
        ///    \    /|    /                    \         /
        ///     \  / |   /                      \       /
        ///    D +   |  /        ======>         \     /
        ///       \  | /                          \   /
        ///        \ |/                            \ /
        ///          +                              +
        ///          C                              C
        ///
        /// </summary>
        private static void FinalizationConstraints(DTSweepContext tcx)
        {
            // Get an Internal triangle to start with
            DelaunayTriangle   t = tcx.Front.Head.Triangle;
            TriangulationPoint p = tcx.Front.Head.Point;

            while (!t.GetConstrainedEdgeCW(p))
            {
                DelaunayTriangle tTmp = t.NeighborCCWFrom(p);
                if (tTmp == null)
                {
                    break;
                }
                t = tTmp;
            }

            // Collect interior triangles constrained by edges
            tcx.MeshClean(t);
        }
Esempio n. 3
0
        private static void FinalizationPolygon(DTSweepContext tcx)
        {
            // Get an Internal triangle to start with
            DelaunayTriangle t = tcx.aFront.Head.Next.Triangle;
            TriangulationPoint p = tcx.aFront.Head.Next.Point;
            while (!t.GetConstrainedEdgeCW(p))
            {
                t = t.NeighborCCW(p);
            }

            // Collect interior triangles constrained by edges
            tcx.MeshClean(t);
        }