Closed GoogleCodeExporter closed 9 years ago
Use broad-first search, smth. like this void SweepContext::MeshClean(Triangle& triangle) { if (&triangle==NULL) return; if (triangle.IsInterior()) return; std::deque<Triangle*> deque; deque.push_back(&triangle); triangle.IsInterior(true); while (!deque.empty()) { Triangle &tri = *deque.front(); deque.pop_front(); triangles_.push_back(&tri); for (int i=0; i<3; ++i) if (!tri.constrained_edge[i]) { Triangle *tri2 = tri.GetNeighbor(i); if (tri2!=NULL && !tri2->IsInterior()) { tri2->IsInterior(true); deque.push_back(tri2); } } } }
Original issue reported on code.google.com by merc2012...@gmail.com on 31 Jul 2012 at 12:29
merc2012...@gmail.com
Original comment by mason.gr...@gmail.com on 2 May 2013 at 1:27
mason.gr...@gmail.com
Original issue reported on code.google.com by
merc2012...@gmail.com
on 31 Jul 2012 at 12:29