简体   繁体   English

什么时候我需要停止在八叉树中划分八分圆?

[英]When i need to to stop dividing octants in Octree?

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:这可确保:

  1. The total space consumed by the tree is at most proportional to the number of trianges;树消耗的总空间最多与三角形的数量成正比;
  2. The total time spent traversing down the tree is at most proportional to the number of triangles you'll have to directly process in the target leaf;遍历树所花费的总时间最多与您必须在目标叶子中直接处理的三角形数量成正比; and
  3. You can still go deep when necessary to decompose a tight cluster.当需要分解紧密簇时,您仍然可以深入 go。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM