20 #include "../Noise/Noise.h" 49 m_Coords(0x7fffffff, 0x7fffffff)
91 static const size_t m_CoeffZ = 5;
137 float GetNoise(
float x,
float y);
178 m_BiomeGen(a_BiomeGen)
186 return Super::GetHeightAt(a_BlockX, a_BlockZ);
std::vector< size_t > m_CacheOrder
cRidgedMultiNoise m_DitchNoise
std::shared_ptr< cTerrainHeightGen > cTerrainHeightGenPtr
The interface that is used to query terrain height from the shape generator.
size_t m_NumSubCaches
Number of sub-caches, pulled out of m_SubCaches.size() for performance reasons.
cHeiGenCachePtrs m_SubCaches
The individual sub-caches.
sCacheData()
Default constructor: Fill in bogus coords, so that the item is not used until properly calculated...
virtual void InitializeHeightGen(cIniFile &a_IniFile)
Initializes the generator, reading its parameters from the INI file.
unsigned char HEIGHTTYPE
The type used by the heightmap.
std::vector< cHeiGenCachePtr > cHeiGenCachePtrs
std::shared_ptr< cHeiGenCache > cHeiGenCachePtr
virtual HEIGHTTYPE GetHeightAt(int a_BlockX, int a_BlockZ) override
Returns the height at the specified column.
cChunkDef::HeightMap m_HeightMap
A simple cache that stores N most recently generated chunks' heightmaps; N being settable upon creati...
cHeiGenBiomal(int a_Seed, cBiomeGenPtr a_BiomeGen)
float NOISE_DATATYPE
The datatype used by all the noise generators.
std::vector< sCacheData > m_CacheData
cHeiGenCache(cTerrainHeightGenPtr a_HeiGenToCache, size_t a_CacheSize)
virtual HEIGHTTYPE GetHeightAt(int a_BlockX, int a_BlockZ) override
Returns the height at the specified column.
cTerrainHeightGenPtr m_HeiGenToCache
The terrain height generator that is being cached.
cRidgedMultiNoise m_MountainNoise
virtual ~cHeiGenCache() override=default
Caches heightmaps in multiple underlying caches to improve the distribution and lower the chain lengt...
HEIGHTTYPE HeightMap[Width *Width]
The type used for any heightmap operations and storage; idx = x + Width * z; Height points to the hig...
EMCSBiome BiomeMap[Width *Width]
The type used for any biomemap operations and storage inside Cuberite, using Cuberite biomes (need no...
virtual void GenHeightMap(cChunkCoords a_ChunkCoords, cChunkDef::HeightMap &a_HeightMap) override
Retrieves the heightmap for the specified chunk.
std::shared_ptr< cBiomeGen > cBiomeGenPtr