/** * Try to map a node to all sides of this triangle that don't have a neighbor. * * @param t */ public void mapTriangleToNodes(DelaunayTriangle t) { AdvancingFrontNode n; for (int i = 0; i < 3; i++) { if (t.neighbors[i] == null) { n = aFront.locatePoint(t.pointCW(t.points[i])); if (n != null) { n.triangle = t; } } } }
protected void meshClean(DelaunayTriangle triangle) { DelaunayTriangle t1, t2; if (triangle != null) { ArrayDeque<DelaunayTriangle> deque = new ArrayDeque<DelaunayTriangle>(); deque.addFirst(triangle); triangle.isInterior(true); while (!deque.isEmpty()) { t1 = 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); } } } } } }