Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Static Private Attributes | List of all members
cHeiGenMinMax Class Reference
Inheritance diagram for cHeiGenMinMax:
Inheritance graph
[legend]
Collaboration diagram for cHeiGenMinMax:
Collaboration graph
[legend]

Public Member Functions

 cHeiGenMinMax (int a_Seed, cBiomeGen &a_BiomeGen)
 
virtual void GenHeightMap (cChunkCoords a_ChunkCoords, cChunkDef::HeightMap &a_HeightMap) override
 Retrieves the heightmap for the specified chunk. More...
 
virtual void InitializeHeightGen (cIniFile &a_IniFile) override
 Initializes the generator, reading its parameters from the INI file. More...
 
- Public Member Functions inherited from cTerrainHeightGen
virtual HEIGHTTYPE GetHeightAt (int a_BlockX, int a_BlockZ)
 Returns the height at the specified column. More...
 
virtual ~cTerrainHeightGen ()
 

Protected Member Functions

void getBiomeMinMax (EMCSBiome a_Biome, double &a_Min, double &a_Max)
 Returns the minimum and maximum heights for the given biome. More...
 

Protected Attributes

cBiomeGenm_BiomeGen
 The biome generator to query for the underlying biomes. More...
 
cNoise m_Noise
 
cPerlinNoise m_Perlin
 
double m_TotalWeight
 Sum of all the m_Weights items. More...
 
double m_Weights [AVERAGING_SIZE *2+1][AVERAGING_SIZE *2+1]
 Weights applied to each of the min / max values in the neighborhood of the currently evaluated column. More...
 

Private Types

using Super = cTerrainHeightGen
 

Static Private Attributes

static const int AVERAGING_SIZE = 4
 Size of the averaging process, in columns (for each direction). More...
 

Additional Inherited Members

- Static Public Member Functions inherited from cTerrainHeightGen
static std::unique_ptr< cTerrainHeightGenCreateHeightGen (cIniFile &a_IniFile, cBiomeGen &a_BiomeGen, int a_Seed, bool &a_CacheOffByDefault)
 Creates a cTerrainHeightGen descendant based on the INI file settings. More...
 

Detailed Description

Definition at line 630 of file HeiGen.cpp.

Member Typedef Documentation

◆ Super

Definition at line 633 of file HeiGen.cpp.

Constructor & Destructor Documentation

◆ cHeiGenMinMax()

cHeiGenMinMax::cHeiGenMinMax ( int  a_Seed,
cBiomeGen a_BiomeGen 
)
inline

Definition at line 640 of file HeiGen.cpp.

Member Function Documentation

◆ GenHeightMap()

virtual void cHeiGenMinMax::GenHeightMap ( cChunkCoords  a_ChunkCoords,
cChunkDef::HeightMap a_HeightMap 
)
inlineoverridevirtual

Retrieves the heightmap for the specified chunk.

Implements cTerrainHeightGen.

Definition at line 662 of file HeiGen.cpp.

◆ getBiomeMinMax()

void cHeiGenMinMax::getBiomeMinMax ( EMCSBiome  a_Biome,
double &  a_Min,
double &  a_Max 
)
inlineprotected

Returns the minimum and maximum heights for the given biome.

Definition at line 749 of file HeiGen.cpp.

◆ InitializeHeightGen()

virtual void cHeiGenMinMax::InitializeHeightGen ( cIniFile a_IniFile)
inlineoverridevirtual

Initializes the generator, reading its parameters from the INI file.

Reimplemented from cTerrainHeightGen.

Definition at line 728 of file HeiGen.cpp.

Member Data Documentation

◆ AVERAGING_SIZE

const int cHeiGenMinMax::AVERAGING_SIZE = 4
staticprivate

Size of the averaging process, in columns (for each direction).

Must be less than 16.

Definition at line 636 of file HeiGen.cpp.

◆ m_BiomeGen

cBiomeGen& cHeiGenMinMax::m_BiomeGen
protected

The biome generator to query for the underlying biomes.

Definition at line 739 of file HeiGen.cpp.

◆ m_Noise

cNoise cHeiGenMinMax::m_Noise
protected

Definition at line 734 of file HeiGen.cpp.

◆ m_Perlin

cPerlinNoise cHeiGenMinMax::m_Perlin
protected

Definition at line 736 of file HeiGen.cpp.

◆ m_TotalWeight

double cHeiGenMinMax::m_TotalWeight
protected

Sum of all the m_Weights items.

Definition at line 745 of file HeiGen.cpp.

◆ m_Weights

double cHeiGenMinMax::m_Weights[AVERAGING_SIZE *2+1][AVERAGING_SIZE *2+1]
protected

Weights applied to each of the min / max values in the neighborhood of the currently evaluated column.

Definition at line 742 of file HeiGen.cpp.


The documentation for this class was generated from the following file: