Zinc is a C++ library for spatial processing.
- Zinc provides efficient functions for processing Morton codes, and things built from Morton codes.
- Currently only Morton curves because they are the easiest to implement and the only space filling curve on which some functions can be implemented, see get_next_z_address
- Intervals are a start and end point on the Morton curve.
- Regions are a finite list of intervals, able to represent arbitrary regions in N-dimensional space.
- Morton regions a.k.a. linear octree
- Intervals and Regions can store data, so they can be used as map types, not just set types.
- AABBs (Axis-Aligned Bounding Boxes) can be used for creating regions
- Regions have all the boolean set operations implemented on them apart from Xor: union, intersection, subtraction
- They can be efficiently indexed by position
- This is alpha software, but it may be useful
Read our blog for more detail
- The Morton code type is currently limited to a single word size, so the Dimension and BitsPerDimension are currently limited to 2,32 and 3,21.
- This is under active development
For usage examples, see
- A C++17 compiler
For testing and installing:
sudo apt install meson
- we use clang++ >= 7 by default for better sanitisation
- you can disable them in
CXX=clang++ meson out
ninja test -C out
ninja install -C out (needs permissions for
Zn comes from Z-order curve in N dimensions, and all the cool kids name their libraries after elements.