Companion

Functions

Link copied to clipboard

Median of nine values by a fixed comparison network, no sorting allocation per cell.

Link copied to clipboard
fun plan(frame: SpatialFrame, maxTriangles: Int, dataMaxZoom: Int): SpatialHeightGrid.Plan

Picks a grid that stays under the triangle budget and does not sample finer than twice the data resolution (overzoomed tiles are just bilinear upsampling).

Link copied to clipboard

Reads every vertex through the tiles at the plan's zoom, one tile fetch per tile. Vertices outside the downloaded coverage are uncovered; the caller cleans and fills them.