Table of Contents

Class ColumnHeightmap

Namespace
Shard.Gameplay.Universe.World.Chunks
Assembly
Shard.Gameplay.Universe.dll

Builds a column's surface heightmap (Java: BlockChunk.updateHeight): the world-Y of the highest non-transparent block at each (x,z) cell, or the column floor when a cell is all air. Every one of our placeholder blocks is opaque, so "non-transparent" is just "non-air" for now (a real block palette with opacity data refines this later). The result is a ColumnBytePalette ready to SerializeShortKeys() into SetColumn.Heightmap.

public static class ColumnHeightmap
Inheritance
ColumnHeightmap
Inherited Members

Methods

Build(IReadOnlyList<BlockChunk>, int)

Scan the column's cubes (bottom-to-top; cubes[i] is the cube at chunk-Y minChunkY + i) and record the highest non-air block's world-Y per cell.

public static ColumnBytePalette Build(IReadOnlyList<BlockChunk> cubes, int minChunkY)

Parameters

cubes IReadOnlyList<BlockChunk>
minChunkY int

Returns

ColumnBytePalette