Interface IElevationTileSet
A resolved set of terrain heights the map can sample on the CPU and displace with on the GPU.
public interface IElevationTileSet : IDisposable
- Inherited Members
Remarks
An implementation must never leave the map with a hole: a failed or empty load reports LoadFailed true and returns a FlatElevationSampler, so the map draws flat instead of sampling nothing.
Properties
HeightArray
Terrarium-encoded heights for the displaced tile shader, or null when nothing loaded.
Texture2DArray HeightArray { get; }
Property Value
- Texture2DArray
LayerCount
Layers actually present in HeightArray.
int LayerCount { get; }
Property Value
LoadFailed
True when the load found nothing usable and the map is drawing flat.
bool LoadFailed { get; }
Property Value
MaxHeightMercator
The largest height anywhere in the set, in normalized mercator. Zero when LoadFailed.
double MaxHeightMercator { get; }
Property Value
Sampler
Ground height source for the view transform's terrain constructor. Flat when LoadFailed.
IElevationSampler Sampler { get; }
Property Value
Methods
TryGetCoverage(TileCoord, out ElevationCoverage)
Where one base tile's heightmap lives in HeightArray.
bool TryGetCoverage(TileCoord baseTile, out ElevationCoverage coverage)
Parameters
baseTileTileCoordBase map tile being drawn.
coverageElevationCoverageThe layer and UV window, or None when this tile has no heightmap.
Returns
- bool
True when the tile is covered.
Remarks
Called for every visible tile every frame, so an implementation must not allocate here.