Skip to main content

Module morton

Module morton 

Source
Expand description

Morton encoding utilities for 3D spatial hashing.

Implements Z-order curve encoding to preserve spatial locality.

Functionsยง

morton_decode_3d
Morton decode a u64 back to 3D coordinates.
morton_encode_3d
Morton encode 3D coordinates into a single u64.
morton_encode_region_3d
Encode a 3D region into a vector of Morton codes.