Table of Contents

Class TerrainCoverageClampCache

Namespace
LansMap.Interaction

Caches TerrainCoverageClamp outputs for a live ScreenMapView, recomputing only when the view has drifted enough to matter.

public sealed class TerrainCoverageClampCache
Inheritance
object
TerrainCoverageClampCache

Remarks

One instance per interaction controller; not thread-safe, not shared. The read path (MaxCoveredPitchDeg(ScreenMapView, double), MinCoveredZoom(ScreenMapView, double)) is allocation-free on a cache hit: no transform construction, no sweep. A miss recomputes both outputs together (they share the same probe machinery and inputs) and costs at most 24 short-lived MapViewTransform probes, never on the steady per-frame path.

Properties

LastLayerBudget

The layer budget the most recent recompute used. Test-only introspection for the budget-wiring assertion.

public int LastLayerBudget { get; }

Property Value

int

RecomputeCount

Number of times a read actually recomputed rather than served a cache hit. Test-only introspection for the recompute-bound assertion.

public int RecomputeCount { get; }

Property Value

int

Methods

MaxCoveredPitchDeg(ScreenMapView, double)

The largest pitch selection can still promise full coverage for, given map's current screen, zoom and layer budget.

public double MaxCoveredPitchDeg(ScreenMapView map, double staticCapDeg)

Parameters

map ScreenMapView
staticCapDeg double

Returns

double

MinCoveredZoom(ScreenMapView, double)

The smallest zoom selection can still promise full coverage for, given map's current screen, pitch and layer budget.

public double MinCoveredZoom(ScreenMapView map, double staticFloorZoom)

Parameters

map ScreenMapView
staticFloorZoom double

Returns

double