Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Before this commit, inserting into BSP tree could easily overflow the stack because we allocate very large stack frames and, on convex geometries (e.g. a sphere), the BSP tree degenerates into a "BSP list", thus requiring one large stack frame per triangle. This can be reproduced by exporting a 2d shaded view of sphere. After this commit, the stack frames only contan a pointer to a supplementary data structure, and moreover it only allocates its fields on demand, conserving heap memory as well. As a side effect, an arbitrary classifier limit of 50 vertices is removed.
- Loading branch information