rust-cv / space

Spatial library for Rust
MIT License
39 stars 4 forks source link

Make morton prefix implicit in octree #9

Closed vadixidav closed 4 years ago

vadixidav commented 5 years ago

In the octree, only the bits below the current level are important to store. The remaining bits existence actually prevents chunks of the octree from being moved at a higher level because then the mortons would be inconsistent. Fix this by masking out the prefix and computing the prefix as the tree is traversed.