Class ChunkRenderCache
Stores render commands generated for a single chunk.
public sealed class ChunkRenderCache
- Inheritance
-
ChunkRenderCache
- Inherited Members
Remarks
This API is intended for engine infrastructure and advanced tooling. Most callers should prefer WorldRenderer instead of managing chunk render caches directly.
Constructors
ChunkRenderCache(ChunkCoord, bool, int, RectI, IReadOnlyList<SpriteDrawCommand>, IReadOnlyList<SpriteDrawCommand>)
Creates a chunk render cache snapshot.
public ChunkRenderCache(ChunkCoord coord, bool isBuilt, int lastBuildTick, RectI worldPixelBounds, IReadOnlyList<SpriteDrawCommand> backgroundCommands, IReadOnlyList<SpriteDrawCommand> foregroundCommands)
Parameters
coordChunkCoordThe chunk coordinate represented by the cache.
isBuiltboolWhether the cache contains valid draw commands.
lastBuildTickintThe monotonic build tick that produced the cache.
worldPixelBoundsRectIThe world-space pixel bounds covered by the chunk.
backgroundCommandsIReadOnlyList<SpriteDrawCommand>The background-wall draw commands generated for the chunk.
foregroundCommandsIReadOnlyList<SpriteDrawCommand>The foreground draw commands generated for the chunk.
Properties
BackgroundCommands
Gets the background-wall draw commands generated for the chunk.
public IReadOnlyList<SpriteDrawCommand> BackgroundCommands { get; }
Property Value
Coord
Gets the chunk coordinate represented by this cache.
public ChunkCoord Coord { get; }
Property Value
ForegroundCommands
Gets the foreground draw commands generated for the chunk.
public IReadOnlyList<SpriteDrawCommand> ForegroundCommands { get; }
Property Value
IsBuilt
Gets a value indicating whether the cache contains valid draw commands.
public bool IsBuilt { get; }
Property Value
LastBuildTick
Gets the monotonic build tick that produced this cache.
public int LastBuildTick { get; }
Property Value
WorldPixelBounds
Gets the world-space pixel bounds covered by the chunk.
public RectI WorldPixelBounds { get; }