rust-cv / space

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

Allow removing a piece of the octree off to put into another octree #13

Closed vadixidav closed 4 years ago

vadixidav commented 6 years ago

In #9 the representation of the octree becomes agnostic to the nodes above the node being observed. This means that pieces of the octree can be removed from a node and inserted into another node in constant time. However, the nodes removed and added, at least after #9, need to be removed and added to the same level of the octree. To solve that, when a node is removed, we have to store the level it was removed from the octree at alongside it so we can perform a runtime check to ensure its never added in the wrong level elsewhere.