快速、模板化、C++ 八叉树实现
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5963954/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Fast, templated, C++ Octree implementation
提问by Robinson
I've been searching high and low (mostly on google) for a fast, efficient, templated (ie. with STL-like properties) octree implementation, without success. I want to use this in the context of a 3D scene graph.
我一直在高低(主要是在谷歌上)搜索快速、高效、模板化(即具有类似 STL 的属性)八叉树实现,但没有成功。我想在 3D 场景图的上下文中使用它。
Does such a thing exist, or do people generally roll their own? I'm hoping my friends at stackoverflow will know where to find one.
这样的东西是否存在,或者人们通常自己滚动?我希望我在 stackoverflow 的朋友会知道在哪里可以找到。
采纳答案by Lou Franco
回答by Janus Troelsen
http://nomis80.org/code/octree.html
This is my favorite. It is GPL and has it's own homepage, so it's meant to be used by others. It has Doxygen documentation, and the authors are taking questions.
http://www.flipcode.com/archives/Octree_Implementation.shtml
This one is not templated. It has more comments in the code than every other I've seen, so that might be more useful if you are trying to find out how octrees work.
http://nomis80.org/code/octree.html
这是我最喜欢的。它是 GPL 并且有它自己的主页,所以它应该被其他人使用。它有 Doxygen 文档,作者正在提问。
http://www.flipcode.com/archives/Octree_Implementation.shtml
这个不是模板化的。它在代码中的注释比我见过的任何其他注释都多,因此如果您想了解八叉树的工作原理,这可能更有用。
回答by Jeroen Baert
Also recently released: http://www.openvdb.org/
最近也发布了:http: //www.openvdb.org/
A volume hierarchy format by Dreamworks.
Dreamworks 的卷层次结构格式。

