summaryrefslogtreecommitdiffstats
path: root/source/Generating/Noise3DGenerator.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-11 23:09:39 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-11 23:09:39 +0200
commit8f2920a090dd9000aecb04c901311ffe195ea39b (patch)
tree1083f433b946892c267eaef4cf3e6e33ab6975d0 /source/Generating/Noise3DGenerator.h
parentAdded generic LinearInterpolation in 1D, 2D and 3D. (diff)
downloadcuberite-8f2920a090dd9000aecb04c901311ffe195ea39b.tar
cuberite-8f2920a090dd9000aecb04c901311ffe195ea39b.tar.gz
cuberite-8f2920a090dd9000aecb04c901311ffe195ea39b.tar.bz2
cuberite-8f2920a090dd9000aecb04c901311ffe195ea39b.tar.lz
cuberite-8f2920a090dd9000aecb04c901311ffe195ea39b.tar.xz
cuberite-8f2920a090dd9000aecb04c901311ffe195ea39b.tar.zst
cuberite-8f2920a090dd9000aecb04c901311ffe195ea39b.zip
Diffstat (limited to '')
-rw-r--r--source/Generating/Noise3DGenerator.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/Generating/Noise3DGenerator.h b/source/Generating/Noise3DGenerator.h
index 071b19019..57cf024f8 100644
--- a/source/Generating/Noise3DGenerator.h
+++ b/source/Generating/Noise3DGenerator.h
@@ -29,9 +29,13 @@ public:
virtual void DoGenerate(int a_ChunkX, int a_ChunkZ, cChunkDesc & a_ChunkDesc) override;
protected:
- cNoise m_Noise1;
- cNoise m_Noise2;
- cNoise m_Noise3;
+ // Linear interpolation dimensions:
+ static const int DIMX = 5;
+ static const int DIMY = 65;
+ static const int DIMZ = 5;
+
+ cPerlinNoise m_Perlin; // The base 3D noise source for the actual composition
+ cCubicNoise m_Cubic; // The noise used for heightmap directing
int m_SeaLevel;
NOISE_DATATYPE m_HeightAmplification;
@@ -41,7 +45,7 @@ protected:
NOISE_DATATYPE m_FrequencyZ;
NOISE_DATATYPE m_AirThreshold;
- /// Generates the 3D noise array used for terrain generation
+ /// Generates the 3D noise array used for terrain generation; a_Noise is of ChunkData-size
void GenerateNoiseArray(int a_ChunkX, int a_ChunkZ, NOISE_DATATYPE * a_Noise);
/// Updates heightmap based on the chunk's contents