rust-cv / space

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

Why was the morton code removed? #34

Open jc4x4 opened 3 years ago

jc4x4 commented 3 years ago

I came across v0.7 and found the morton code. But they seem to be removed in the latest crate. https://docs.rs/space/0.7.0/space/

vadixidav commented 3 years ago

@j4ckcyw The functionality of the old space crate was removed because it was intended to be split into its own crate specifically for octrees. I never got around to that yet because the Rust CV project hasn't needed to render point clouds that are dense enough to need that code. If you are interested in taking the octree code and splitting it into a separate crate, I can help you work on that.

jc4x4 commented 3 years ago

I was trying to evaluate gray code vs morton code. Is this something you know about? I'm current getting away with using an older version of this crate.

vadixidav commented 3 years ago

@j4ckcyw If you need a space-filling curve that preserves locality, I recommend either Z-curve (Morton code) or Hilbert curve. Z-curve is cheap to compute. Gray codes are more useful for logic analysis, but not as much for locality-preserving space-filling curves. Hilbert curve is probably the most effective such curve.

vadixidav commented 3 years ago

@j4ckcyw I recommend you join the Discord server if you are interested in learning more about this. You can ask me questions on there: https://discord.gg/d32jaam