16 #include "../Noise/Noise.h" 17 #include "../Noise/InterpolNoise.h" 123 void GenerateNoiseArrayIfNeeded(
cChunkCoords a_ChunkCoords);
144 static const int AVERAGING_SIZE = 9;
197 void GenerateNoiseArrayIfNeeded(
cChunkCoords a_ChunkCoords);
200 void CalcBiomeParamArrays(
cChunkCoords a_ChunkCoords, ChunkParam & a_HeightAmp, ChunkParam & a_MidPoint);
Byte Shape[256 *16 *16]
The datatype used to represent the entire chunk worth of shape.
NOISE_DATATYPE m_HeightAmplification
The main parameter of the generator, specifies the slope of the vertical linear gradient.
cOctavedNoise< cInterpolNoise< Interp5Deg > > m_BaseNoise
Heightmap-like noise used to provide variance for low-amplitude biomes.
NOISE_DATATYPE m_AirThreshold
NOISE_DATATYPE m_BaseFrequencyX
NOISE_DATATYPE m_BaseFrequencyX
NOISE_DATATYPE m_ChoiceFrequencyZ
NOISE_DATATYPE m_FrequencyZ
cOctavedNoise< cInterp5DegNoise > m_Cubic
The noise used for heightmap directing.
cOctavedNoise< cInterpolNoise< Interp5Deg > > m_DensityNoiseB
Density 3D noise, variant B.
cChunkCoords m_LastChunkCoords
static const int UPSCALE_X
int m_SeaLevel
Block height of the sealevel, used for composing the terrain.
NOISE_DATATYPE m_HeightAmplification
EMCSBiome
Biome IDs The first batch corresponds to the clientside biomes, used by MineCraft.
NOISE_DATATYPE m_ChoiceFrequencyY
static const int UPSCALE_Y
void ComposeTerrain(cChunkDesc &a_ChunkDesc)
Composes terrain - adds dirt, grass and sand.
cOctavedNoise< cInterpolNoise< Interp5Deg > > m_ChoiceNoise
The noise that is used to choose between density noise A and B.
virtual void Generate(cChunkDesc &a_ChunkDesc) override
Does the actual chunk generation.
NOISE_DATATYPE m_AirThreshold
virtual ~cNoise3DGenerator() override
NOISE_DATATYPE m_BaseFrequencyZ
void GenerateNoiseArray(cChunkCoords a_ChunkCoords, NOISE_DATATYPE *a_Noise)
Generates the 3D noise array used for terrain generation into a_Noise; a_Noise is of ChunkData-size...
NOISE_DATATYPE m_FrequencyY
cOctavedNoise< cInterpolNoise< Interp5Deg > > m_DensityNoiseA
Density 3D noise, variant A.
cOctavedNoise< cInterpolNoise< Interp5Deg > > m_DensityNoiseB
Density 3D noise, variant B.
NOISE_DATATYPE m_MidPoint
Where the vertical "center" of the noise should be, as block height.
NOISE_DATATYPE m_FrequencyY
NOISE_DATATYPE m_FrequencyX
NOISE_DATATYPE m_ChoiceFrequencyZ
float NOISE_DATATYPE
The datatype used by all the noise generators.
virtual void GenerateBiomes(cChunkCoords a_ChunkCoords, cChunkDef::BiomeMap &a_BiomeMap) override
Generates the biomes for the specified chunk.
NOISE_DATATYPE m_FrequencyY
cChunkCoords m_LastChunkCoords
NOISE_DATATYPE m_ChoiceFrequencyX
NOISE_DATATYPE m_WeightSum
The sum of m_Weight[].
The interface that a terrain shape generator must implement A terrain shape generator takes chunk coo...
NOISE_DATATYPE m_ChoiceFrequencyX
NOISE_DATATYPE m_BaseFrequencyZ
NOISE_DATATYPE m_MidPoint
cOctavedNoise< cInterpolNoise< Interp5Deg > > m_DensityNoiseA
Density 3D noise, variant A.
cBiomeGenPtr m_BiomeGen
The underlying biome generator.
virtual void InitializeShapeGen(cIniFile &a_IniFile) override
Reads parameters from the ini file, prepares generator for use.
cOctavedNoise< cInterpolNoise< Interp5Deg > > m_ChoiceNoise
The 3D noise that is used to choose between density noise A and B.
NOISE_DATATYPE m_FrequencyZ
NOISE_DATATYPE m_FrequencyZ
cOctavedNoise< cInterp5DegNoise > m_Perlin
The base 3D noise source for the actual composition.
virtual void Initialize(cIniFile &a_IniFile) override
Called to initialize the generator on server startup.
virtual void InitializeShapeGen(cIniFile &a_IniFile) override
Reads parameters from the ini file, prepares generator for use.
static const int UPSCALE_Z
NOISE_DATATYPE m_AirThreshold
EMCSBiome BiomeMap[Width *Width]
The type used for any biomemap operations and storage inside Cuberite, using Cuberite biomes (need no...
NOISE_DATATYPE m_FrequencyX
cOctavedNoise< cInterpolNoise< Interp5Deg > > m_BaseNoise
Heightmap-like noise used to provide variance for low-amplitude biomes.
NOISE_DATATYPE m_ChoiceFrequencyY
NOISE_DATATYPE m_FrequencyX
The interface that all chunk generators must implement to provide the generated chunks.
std::shared_ptr< cBiomeGen > cBiomeGenPtr