rust-cv / space

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

Add uncanonicalize to MortonRegion #25

Closed vadixidav closed 4 years ago

vadixidav commented 5 years ago

Canonicalize creates a canonical version of the region which takes up the same space as its underlying morton. By detecting the most significant bit position in the morton, it should be possible to reverse the canonicalization process. This should be optimized using the bitwise crate to take advantage of bit twiddling CPU instructions.