Class TileCoverBuilder
Builds opaque and fading draw lists from the visible footprint and residency.
public sealed class TileCoverBuilder
- Inheritance
-
objectTileCoverBuilder
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
Fading
Fading quads from the last Build, valid through FadingCount.
public readonly TileDrawItem[] Fading
Field Value
MaxAncestorFallback
Inclusive cap on ancestor zoom steps searched for fallback imagery.
public const int MaxAncestorFallback = 10
Field Value
MaxDescendantFallback
Cap on descendant zoom steps searched for a full-covering child set.
public const int MaxDescendantFallback = 2
Field Value
Opaque
Opaque quads from the last Build, valid through OpaqueCount.
public readonly TileDrawItem[] Opaque
Field Value
Properties
DroppedCount
public int DroppedCount { get; }
Property Value
ExactCount
Visible tiles drawn opaque at their own level this build.
public int ExactCount { get; }
Property Value
FadingCount
Number of valid entries in Fading.
public int FadingCount { get; }
Property Value
FallbackCount
Visible tiles that were not fully opaque at their own level, so fallback was attempted.
public int FallbackCount { get; }
Property Value
OpaqueCount
Number of valid entries in Opaque.
public int OpaqueCount { get; }
Property Value
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
PinTruncatedCount
Referenced keys that did not fit in the last CollectReferencedKeys(long[]) buffer.
public int PinTruncatedCount { get; }
Property Value
UncoveredCount
Visible tiles with no resident imagery at any searched level, including themselves.
public int UncoveredCount { get; }
Property Value
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
visibleList<TileCoord>Tiles in view, without world copies.
residencyITileResidencyCurrent GPU layers by packed tile key.
fadesFadeTrackerPer-key fade alphas at
now.nowdoubleCurrent time in seconds, same clock as
fades.zoomFracdoubleFractional 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
visibleList<VisibleTile>Tiles in view, including world copies.
residencyITileResidencyCurrent GPU layers by packed tile key.
fadesFadeTrackerPer-key fade alphas at
now.nowdoubleCurrent time in seconds, same clock as
fades.zoomFracdoubleFractional 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
resultlong[]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
tileTileCoordTile 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.