Table of Contents

Class TileCoverBuilder

Builds opaque and fading draw lists from the visible footprint and residency.

public sealed class TileCoverBuilder
Inheritance
object
TileCoverBuilder

Remarks

This type chooses what to draw. It does not pin GPU layers; pinning is the streamer's job. Every draw item inherits the visible tile's world copy. Residency lookups stay offset-blind: one resident layer serves every copy of a tile.

Fields

Capacity

Maximum tiles in each of Opaque and Fading. Extra tiles increment DroppedCount.

public const int Capacity = 1024

Field Value

int

Fading

Fading quads from the last Build, valid through FadingCount.

public readonly TileDrawItem[] Fading

Field Value

TileDrawItem[]

MaxAncestorFallback

Inclusive cap on ancestor zoom steps searched for fallback imagery.

public const int MaxAncestorFallback = 10

Field Value

int

MaxDescendantFallback

Cap on descendant zoom steps searched for a full-covering child set.

public const int MaxDescendantFallback = 2

Field Value

int

Opaque

Opaque quads from the last Build, valid through OpaqueCount.

public readonly TileDrawItem[] Opaque

Field Value

TileDrawItem[]

Properties

DroppedCount

Quads that did not fit in Opaque or Fading.

public int DroppedCount { get; }

Property Value

int

ExactCount

Visible tiles drawn opaque at their own level this build.

public int ExactCount { get; }

Property Value

int

FadingCount

Number of valid entries in Fading.

public int FadingCount { get; }

Property Value

int

FallbackCount

Visible tiles that were not fully opaque at their own level, so fallback was attempted.

public int FallbackCount { get; }

Property Value

int

OpaqueCount

Number of valid entries in Opaque.

public int OpaqueCount { get; }

Property Value

int

PartitionedFallback

True when Build(List<TileCoord>, ITileResidency, FadeTracker, double, double) should emit a non-overlapping partition instead of the flat cover's overlapping fallback quads. Displaced mode only; default false.

public bool PartitionedFallback { get; set; }

Property Value

bool

PinTruncatedCount

Referenced keys that did not fit in the last CollectReferencedKeys(long[]) buffer.

public int PinTruncatedCount { get; }

Property Value

int

UncoveredCount

Visible tiles with no resident imagery at any searched level, including themselves.

public int UncoveredCount { get; }

Property Value

int

Methods

Build(List<TileCoord>, ITileResidency, FadeTracker, double, double)

Builds draw lists for identity-level tiles at world copy 0.

public void Build(List<TileCoord> visible, ITileResidency residency, FadeTracker fades, double now, double zoomFrac = 0)

Parameters

visible List<TileCoord>

Tiles in view, without world copies.

residency ITileResidency

Current GPU layers by packed tile key.

fades FadeTracker

Per-key fade alphas at now.

now double

Current time in seconds, same clock as fades.

zoomFrac double

Fractional zoom, unitless; parent blend is gated to mid-fraction.

Build(List<VisibleTile>, ITileResidency, FadeTracker, double, double)

Builds opaque and fading draw lists for the visible tiles.

public void Build(List<VisibleTile> visible, ITileResidency residency, FadeTracker fades, double now, double zoomFrac = 0)

Parameters

visible List<VisibleTile>

Tiles in view, including world copies.

residency ITileResidency

Current GPU layers by packed tile key.

fades FadeTracker

Per-key fade alphas at now.

now double

Current time in seconds, same clock as fades.

zoomFrac double

Fractional zoom, unitless; parent blend is gated to mid-fraction.

Remarks

Draw items inherit each visible tile's world copy. Residency lookups ignore the copy: one resident layer serves every offset.

CollectReferencedKeys(long[])

Writes packed keys of tiles referenced by the last Build into result.

public int CollectReferencedKeys(long[] result)

Parameters

result long[]

Destination of packed tile keys, offset-blind.

Returns

int

Number of keys written, at most result.Length.

Remarks

The caller uses this list to pin. This method does not pin layers or keep tiles resident. Two world copies of one tile share one key.

WasLevelCoverDrawn(TileCoord)

True when the last completed Build drew a different zoom over this tile's area.

public bool WasLevelCoverDrawn(TileCoord tile)

Parameters

tile TileCoord

Tile about to appear.

Returns

bool

True when an ancestor within MaxAncestorFallback or a descendant within MaxDescendantFallback was in the last opaque list.

Remarks

Use this as the level-transition test for fades: a tile switching in over such cover crossfades; a tile switching in where nothing drew appears instantly. Keys are offset-blind.