diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-04-26 15:38:42 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-04-26 15:38:42 +0300 |
commit | ffb1128951638fb462fe1e24aa2963aab6246b07 (patch) | |
tree | f83596d4e7f3a509c255c87a2f42b8f497fb0e1b /src/noise.h | |
parent | 664eb4f7c58cf9d879e9435a207da2e5f80fe9bc (diff) | |
download | minetest-ffb1128951638fb462fe1e24aa2963aab6246b07.tar.gz minetest-ffb1128951638fb462fe1e24aa2963aab6246b07.tar.bz2 minetest-ffb1128951638fb462fe1e24aa2963aab6246b07.zip |
tested out and commented out some new stuff for the terrain generator, to be used in the future.
Diffstat (limited to 'src/noise.h')
-rw-r--r-- | src/noise.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/noise.h b/src/noise.h index 88b995b1e..ba26519f2 100644 --- a/src/noise.h +++ b/src/noise.h @@ -41,5 +41,29 @@ double noise3d_perlin(double x, double y, double z, int seed, double noise3d_perlin_abs(double x, double y, double z, int seed, int octaves, double persistence); +class NoiseBuffer +{ +public: + NoiseBuffer(); + ~NoiseBuffer(); + + void clear(); + void create(int seed, int octaves, double persistence, + double pos_scale, + double first_x, double first_y, double first_z, + double last_x, double last_y, double last_z, + double samplelength_x, double samplelength_y, double samplelength_z); + + void intSet(int x, int y, int z, double d); + double intGet(int x, int y, int z); + double get(double x, double y, double z); + +private: + double *m_data; + double m_start_x, m_start_y, m_start_z; + double m_samplelength_x, m_samplelength_y, m_samplelength_z; + int m_size_x, m_size_y, m_size_z; +}; + #endif |