Module morton

Module morton 

Source

Functions§

morton_encode_u32
Encode x,y,z position into a u64 morton value. Input should be 0..=2u16.pow(10) (or 1u16 << 10) (only included for reference, this isn’t reasonably accurate for most BVHs)
morton_encode_u64
Encode x,y,z position into a u64 morton value. Input should be 0..=2u32.pow(21) (or 1u32 << 21)
morton_encode_u64_unorm
Encode a DVec3 position into a u128 morton value. Input should be 0.0..=1.0
morton_encode_u128
Encode x,y,z position into a u128 morton value. Input should be 0..=2u64.pow(42) (or 1u64 << 42)
morton_encode_u128_unorm
Encode a DVec3 position into a u128 morton value. Input should be 0.0..=1.0
split_by_3_u32
split_by_3_u64
split_by_3_u128