pub fn encode_terrain(
elevations: &[f32],
grid_size: u32,
bounds: &TileBounds,
options: &TerrainOptions,
) -> Vec<u8> โExpand description
Encode a flat row-major (north โ south) f32 elevation grid to a
quantized-mesh .terrain byte vector.
elevations.len() must equal grid_size * grid_size.
ยงPanics
Panics if the length check fails, or for the panics listed on
encode_terrain_from_fn.