c++arraysvoxeloctree

Octree with 3d array like interface


I want to use octree to save space, because I have a bunch of 3d arrays with a lot of same data (voxel chunks where blocks just uint16). I've seen implementations of octrees for ray traversal or space partitioning but all of them contain octree center and node size, I do not need any of that, I want only compressed data storage. I'm currently looking into Morton codes, but I'm not even sure if this is the right thing to do.


Solution

  • I made what i wanted, size can be computed from amount of splits. https://github.com/markusgod/cubic-octree