예제 #1
0
        public void meshClean(DelaunayTriangle triangle)
        {
            DelaunayTriangle t1, t2;

            if (triangle != null)
            {
                LinkedList <DelaunayTriangle> deque = new LinkedList <DelaunayTriangle>();
                deque.AddFirst(triangle);
                triangle.isInterior(true);

                while (deque.Count != 0)
                {
                    t1 = deque.First.Value;
                    deque.RemoveFirst();
                    _triUnit.addTriangle(t1);
                    for (int i = 0; i < 3; ++i)
                    {
                        if (!t1.cEdge[i])
                        {
                            t2 = t1.neighbors[i];
                            if (t2 != null && !t2.isInterior())
                            {
                                t2.isInterior(true);
                                deque.AddLast(t2);
                            }
                        }
                    }
                }
            }
        }