Cuberite
A lightweight, fast and extensible game server for Minecraft
|
The interface that is used to query terrain height from the shape generator. More...
#include <ComposableGenerator.h>
Public Member Functions | |
virtual void | GenHeightMap (cChunkCoords a_ChunkCoords, cChunkDef::HeightMap &a_HeightMap)=0 |
Retrieves the heightmap for the specified chunk. More... | |
virtual HEIGHTTYPE | GetHeightAt (int a_BlockX, int a_BlockZ) |
Returns the height at the specified column. More... | |
virtual void | InitializeHeightGen (cIniFile &a_IniFile) |
Initializes the generator, reading its parameters from the INI file. More... | |
virtual | ~cTerrainHeightGen () |
Static Public Member Functions | |
static std::unique_ptr< cTerrainHeightGen > | CreateHeightGen (cIniFile &a_IniFile, cBiomeGen &a_BiomeGen, int a_Seed, bool &a_CacheOffByDefault) |
Creates a cTerrainHeightGen descendant based on the INI file settings. More... | |
The interface that is used to query terrain height from the shape generator.
Usually the structure generators require only the final heightmap, and generating the whole shape only to consume the heightmap is wasteful, so this interface is used instead; it has a cache implemented over it so that data is retained.
Definition at line 110 of file ComposableGenerator.h.
|
inlinevirtual |
Definition at line 113 of file ComposableGenerator.h.
|
static |
Creates a cTerrainHeightGen descendant based on the INI file settings.
Definition at line 835 of file HeiGen.cpp.
|
pure virtual |
Retrieves the heightmap for the specified chunk.
Implemented in cHeiGenBiomal, cHeiGenMountains, cHeiGenClassic, cHeiGenFlat, cHeiGenMultiCache, cHeiGenCache, cHeiGenMinMax, cHeiGenSteppy, and cCompositedHeiGen.
|
inlinevirtual |
Returns the height at the specified column.
The default implementation calls GenHeightMap(), and then queries the heightmap. Descendants may provide a better-performing method.
Reimplemented in cHeiGenBiomal, cHeiGenMultiCache, and cHeiGenCache.
Definition at line 124 of file ComposableGenerator.h.
|
inlinevirtual |
Initializes the generator, reading its parameters from the INI file.
Reimplemented in cHeiGenBiomal, cHeiGenMountains, cHeiGenClassic, cHeiGenFlat, and cHeiGenMinMax.
Definition at line 119 of file ComposableGenerator.h.