Skip to main content

encode_heights_into

Function encode_heights_into 

Source
pub fn encode_heights_into(
    elevations: &[f64],
    width: u32,
    height: u32,
    out: &mut [u8],
)
Expand description

Encode a row-major width × height elevation grid into a caller-owned little-endian u16 byte buffer. out.len() must equal width * height * 2.

Rows are expected north → south, columns west → east (Cesium’s convention).

§Panics

Panics if elevations.len() < (width * height) as usize or if out is the wrong size.