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-14 23:11:40 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-14 23:11:40 +0200
commit464dcc3764f42fd7620bc261b844bf79cfd07768 (patch)
tree1da1e45d9491f6ce3ed71de63c2347c821bef68e /source/Generating/Noise3DGenerator.h
parentAdded more logging to pickup collection code. (diff)
downloadcuberite-464dcc3764f42fd7620bc261b844bf79cfd07768.tar
cuberite-464dcc3764f42fd7620bc261b844bf79cfd07768.tar.gz
cuberite-464dcc3764f42fd7620bc261b844bf79cfd07768.tar.bz2
cuberite-464dcc3764f42fd7620bc261b844bf79cfd07768.tar.lz
cuberite-464dcc3764f42fd7620bc261b844bf79cfd07768.tar.xz
cuberite-464dcc3764f42fd7620bc261b844bf79cfd07768.tar.zst
cuberite-464dcc3764f42fd7620bc261b844bf79cfd07768.zip
Diffstat (limited to '')
-rw-r--r--source/Generating/Noise3DGenerator.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/Generating/Noise3DGenerator.h b/source/Generating/Noise3DGenerator.h
index 57cf024f8..b23e8645b 100644
--- a/source/Generating/Noise3DGenerator.h
+++ b/source/Generating/Noise3DGenerator.h
@@ -29,10 +29,15 @@ public:
virtual void DoGenerate(int a_ChunkX, int a_ChunkZ, cChunkDesc & a_ChunkDesc) override;
protected:
- // Linear interpolation dimensions:
- static const int DIMX = 5;
- static const int DIMY = 65;
- static const int DIMZ = 5;
+ // Linear interpolation step sizes, must be divisors of cChunkDef::Width and cChunkDef::Height, respectively:
+ static const int UPSCALE_X = 8;
+ static const int UPSCALE_Y = 4;
+ static const int UPSCALE_Z = 8;
+
+ // Linear interpolation buffer dimensions, calculated from the step sizes:
+ static const int DIM_X = 1 + cChunkDef::Width / UPSCALE_X;
+ static const int DIM_Y = 1 + cChunkDef::Height / UPSCALE_Y;
+ static const int DIM_Z = 1 + cChunkDef::Width / UPSCALE_Z;
cPerlinNoise m_Perlin; // The base 3D noise source for the actual composition
cCubicNoise m_Cubic; // The noise used for heightmap directing