Reputation: 10122
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.
Upvotes: 35
Views: 52049
Reputation: 89142
Check this one out: http://svn.pointclouds.org/pcl/trunk/octree/
Updated link: https://github.com/PointCloudLibrary/pcl/tree/master/octree
Upvotes: 8
Reputation: 21270
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.
Upvotes: 15
Reputation: 1314
Also recently released: http://www.openvdb.org/
A volume hierarchy format by Dreamworks.
Upvotes: 10