rust-cv / space

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

Switch away from storing multiple elements per leaf in Octree #7

Closed vadixidav closed 6 years ago

vadixidav commented 6 years ago

In most cases it is unecessary to store multiple elements per leaf in the octree. With the addition of the entry API (#6), it will be easy to modify state (to combine particles) or use vectors internally (by inserting to vec on Occupied), which works better. This will also simplify some APIs and increase iteration speed (since we wont need to flat map the vectors). This is also needed to let the octree lazily store sub-regions as leaves, since we need the entry API to be able to correctly handle the updating and expansion of leaves.