I'm implementing octree data structure. In octants i store triangles. So question: When i need to to stop dividing octants in Octree? I think about max depth or number of max number of triangles in octant, but how i can calculate this values?
A good rule for many circumstances is to subdivide a box if the number of triangles in it is more than twice its depth in the tree. This ensures that: