如果我想得到相反的效果,就是在点密度高的地方将会生成比较大的BOX,但是在点密度低的地方就能生成比较小的BOX的话,我该怎么做?[attach]41970[/attach][attach]41969[/attach] 作者: ccyy88 时间: 2014-6-3 06:39
[attach]41971[/attach] 作者: zdjdevil 时间: 2014-6-3 10:29
直接用octree当然不行,如果只是需要简单的反向后续在进行缩放或其他操作改变吧,顺便发一下octree的原理,便于理解它的操作流程,来自David Rutten——
Octrees work as follows:
A single box is created to contain all points. It can either be a tight bounding box or a cube.
If the box contains more than G points then then box is subdivided into 8 smaller boxes, each exactly 1/8 of the volume.
For each new box, repeat step 2.
所以如果用代码仿造这个思路,反向的思路大概是如果分割的box里的点小于某个值(当然需要设置下限)就继续分割。作者: Je_t’aime_pass 时间: 2014-6-3 14:25
你去参考八叉树的算法,可以算出的。。