41 memcpy(a_HeightMap, desc.
GetHeightMap(),
sizeof(a_HeightMap));
Wraps the chunk coords into a single structure.
HEIGHTTYPE HeightMap[Width *Width]
The type used for any heightmap operations and storage; idx = x + Width * z; Height points to the hig...
Byte Shape[256 *16 *16]
The datatype used to represent the entire chunk worth of shape.
cChunkDef::HeightMap & GetHeightMap(void)
cChunkDef::BiomeMap & GetBiomeMap(void)
void SetHeightFromShape(const Shape &a_Shape)
Sets the heightmap to match the given shape data.
The interface that a biome generator must implement A biome generator takes chunk coords on input and...
virtual void GenBiomes(cChunkCoords a_ChunkCoords, cChunkDef::BiomeMap &a_BiomeMap)=0
Generates biomes for the given chunk.
The interface that a terrain shape generator must implement A terrain shape generator takes chunk coo...
virtual void GenShape(cChunkCoords a_ChunkCoords, cChunkDesc::Shape &a_Shape)=0
Generates the shape for the given chunk.
The interface that is used to query terrain height from the shape generator.
The interface that a terrain composition generator must implement Terrain composition takes chunk coo...
virtual void ComposeTerrain(cChunkDesc &a_ChunkDesc, const cChunkDesc::Shape &a_Shape)=0
Generates the chunk's composition into a_ChunkDesc, using the terrain shape provided in a_Shape.
virtual void GenHeightMap(cChunkCoords a_ChunkCoords, cChunkDef::HeightMap &a_HeightMap) override
Retrieves the heightmap for the specified chunk.
cTerrainCompositionGen & m_CompositionGen
cTerrainShapeGen & m_ShapeGen
cCompositedHeiGen(cBiomeGen &a_BiomeGen, cTerrainShapeGen &a_ShapeGen, cTerrainCompositionGen &a_CompositionGen)