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.
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.
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.
Also recently released: http://www.openvdb.org/
A volume hierarchy format by Dreamworks.
Check this one out: http://svn.pointclouds.org/pcl/trunk/octree/
Updated link: https://github.com/PointCloudLibrary/pcl/tree/master/octree
精彩评论