From f34cbb9e76a22da57a9bc9a8e7d7d7cb36b5d0f0 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 27 Apr 2013 16:41:20 +0000 Subject: Noise3D: Made settable through INI, added slight height control, added basic compositing git-svn-id: http://mc-server.googlecode.com/svn/trunk@1417 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Generating/Noise3DGenerator.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source/Generating/Noise3DGenerator.h') diff --git a/source/Generating/Noise3DGenerator.h b/source/Generating/Noise3DGenerator.h index 3a6b6dff4..44f4f3fce 100644 --- a/source/Generating/Noise3DGenerator.h +++ b/source/Generating/Noise3DGenerator.h @@ -32,6 +32,24 @@ public: protected: cNoise m_Noise1; cNoise m_Noise2; + cNoise m_Noise3; + + int m_SeaLevel; + NOISE_DATATYPE m_HeightAmplification; + NOISE_DATATYPE m_MidPoint; // Where the vertical "center" of the noise should be + NOISE_DATATYPE m_FrequencyX; + NOISE_DATATYPE m_FrequencyY; + NOISE_DATATYPE m_FrequencyZ; + NOISE_DATATYPE m_AirThreshold; + + /// Generates the 3D noise array used for terrain generation + void GenerateNoiseArray(int a_ChunkX, int a_ChunkZ, NOISE_DATATYPE * a_Noise); + + /// Updates heightmap based on the chunk's contents + void UpdateHeightmap(cChunkDesc & a_ChunkDesc); + + /// Composes terrain - adds dirt, grass and sand + void ComposeTerrain(cChunkDesc & a_ChunkDesc); } ; -- cgit v1.2.3