Skip to main content

Module terrain

Module terrain 

Source
Expand description

Terrain elevation subsystem.

Structs§

BackfillState
Per-tile record of which neighbour borders have been backfilled.
ElevationSourceDiagnostics
Diagnostics snapshot for an elevation source.
ElevationSourceFailureDiagnostics
Failure counters for terrain elevation sources.
FlatElevationSource
A flat elevation source that always returns zero elevation.
HttpElevationSource
An ElevationSource that fetches Terrain-RGB tiles over HTTP.
PreparedHillshadeRaster
Prepared hillshade raster derived from a DEM tile.
QuantizedMeshSource
HTTP-backed quantized-mesh elevation source.
TerrainConfig
Configuration for the terrain elevation system.
TerrainDiagnostics
Snapshot diagnostics for the terrain pipeline.
TerrainElevationTexture
GPU-sampleable elevation texture payload for a terrain tile.
TerrainManager
Manages terrain elevation data and mesh generation.
TerrainMeshData
CPU-side terrain mesh data ready for GPU upload.

Enums§

TerrainError
Errors that can occur during terrain operations.
TerrainRgbEncoding
Encoding scheme for Terrain-RGB PNG tiles.

Constants§

NEIGHBOR_OFFSETS
The eight (dx, dy) neighbour offsets – four cardinal, four diagonal.

Traits§

ElevationSource
A source of elevation data for terrain tiles.

Functions§

build_terrain_descriptor
Build a lightweight terrain descriptor that carries reusable-grid metadata and GPU-sampleable elevation payload without eagerly generating displaced CPU geometry.
build_terrain_descriptor_with_source
Build a lightweight terrain descriptor with explicit elevation-source mapping.
build_terrain_mesh
Build a terrain mesh for a tile, displacing vertex Z by elevation values.
build_terrain_mesh_with_source
Build a terrain mesh with explicit elevation-source mapping metadata.
elevation_region_in_texture_space
Remap a logical DEM region from interior tile UV space into the full texture UV space of a border-expanded elevation grid.
expand_with_clamped_border
Wrap a raw elevation grid in a 1-sample border, clamped to the nearest interior sample.
interior_dims
Interior (source) dimensions of an expanded grid.
materialize_terrain_mesh
Materialize displaced CPU geometry from a lightweight terrain descriptor.
patch_border_edge
Overwrite one border strip of target with edge data from neighbor, in place.
patch_changed_tiles
Run incremental backfill patching on all tiles affected by a set of newly loaded tiles.
prepare_hillshade_raster
Prepare a DEM-derived hillshade raster for a tile.
skirt_height
Compute zoom-dependent skirt height in meters.