diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-05-25 09:18:52 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-05-25 09:18:52 +0200 |
commit | a4a418a679f1ac760a8763edd856f0178cfc6dde (patch) | |
tree | 85300ca3a2b3a942998a0c864ae90894857ebf5f /source/HeiGen.h | |
parent | Fixed output directory structure in the "Release profiled" configuration (diff) | |
download | cuberite-a4a418a679f1ac760a8763edd856f0178cfc6dde.tar cuberite-a4a418a679f1ac760a8763edd856f0178cfc6dde.tar.gz cuberite-a4a418a679f1ac760a8763edd856f0178cfc6dde.tar.bz2 cuberite-a4a418a679f1ac760a8763edd856f0178cfc6dde.tar.lz cuberite-a4a418a679f1ac760a8763edd856f0178cfc6dde.tar.xz cuberite-a4a418a679f1ac760a8763edd856f0178cfc6dde.tar.zst cuberite-a4a418a679f1ac760a8763edd856f0178cfc6dde.zip |
Diffstat (limited to 'source/HeiGen.h')
-rw-r--r-- | source/HeiGen.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/source/HeiGen.h b/source/HeiGen.h new file mode 100644 index 000000000..aca2fd593 --- /dev/null +++ b/source/HeiGen.h @@ -0,0 +1,64 @@ +
+// HeiGen.h
+
+/*
+Interfaces to the various height generators:
+ - cHeiGenFlat
+ - cHeiGenClassic
+ - cHeiGenBiomal
+*/
+
+
+
+
+
+#pragma once
+
+#include "cChunkGenerator.h"
+#include "cNoise.h"
+
+
+
+
+
+class cHeiGenFlat :
+ public cTerrainHeightGen
+{
+public:
+ cHeiGenFlat(int a_Height) : m_Height(a_Height) {}
+
+protected:
+
+ int m_Height;
+
+ // cTerrainHeightGen override:
+ virtual void GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::HeightMap & a_HeightMap) override;
+} ;
+
+
+
+
+
+class cHeiGenClassic :
+ public cTerrainHeightGen
+{
+public:
+ cHeiGenClassic(int a_Seed, float a_HeightFreq1, float a_HeightAmp1, float a_HeightFreq2, float a_HeightAmp2, float a_HeightFreq3, float a_HeightAmp3);
+
+protected:
+
+ int m_Seed;
+ cNoise m_Noise;
+ float m_HeightFreq1, m_HeightAmp1;
+ float m_HeightFreq2, m_HeightAmp2;
+ float m_HeightFreq3, m_HeightAmp3;
+
+ float GetNoise(float x, float y);
+
+ // cTerrainHeightGen override:
+ virtual void GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::HeightMap & a_HeightMap) override;
+} ;
+
+
+
+
|