geometry property

Pointer<ma_uint8> geometry
getter/setter pair

Indexed by 3D coordinate. This is a core "block type" value, which is used to index into other arrays; essentially a "palette". This is much more memory-efficient and performance-friendly than storing the values explicitly, but only makes sense if the values are always synchronized.

If a voxel's blocktype is 0, it is assumed to be empty (STBVOX_GEOM_empty), and no other blocktypes should be STBVOX_GEOM_empty. (Only if you do not have blocktypes should STBVOX_GEOM_empty ever used.)

Normally it is an unsigned byte, but you can override it to be a short if you have too many blocktypes.

Implementation

external ffi.Pointer<ffi.UnsignedChar> geometry;