Fast, templated, C++ Octree implementation

2019-01-21 09:58发布

问题:

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.

回答1:

Check this one out: http://svn.pointclouds.org/pcl/trunk/octree/

Updated link: https://github.com/PointCloudLibrary/pcl/tree/master/octree



回答2:

  • 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.



回答3:

Also recently released: http://www.openvdb.org/

A volume hierarchy format by Dreamworks.