diff options
author | Alexander Harkness <me@bearbin.net> | 2015-12-19 15:30:32 +0100 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2015-12-19 15:30:32 +0100 |
commit | 8b851d504875906afe3b40dd87f642fd7d5a93f1 (patch) | |
tree | bdc9006f78ba8ae91e26213130d07e67124b044f /src/Noise | |
parent | Merge pull request #2774 from cuberite/worktycho-patch-1 (diff) | |
download | cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.tar cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.tar.gz cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.tar.bz2 cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.tar.lz cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.tar.xz cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.tar.zst cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Noise/Noise.h | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/src/Noise/Noise.h b/src/Noise/Noise.h index 4c99cee5b..03f61643d 100644 --- a/src/Noise/Noise.h +++ b/src/Noise/Noise.h @@ -68,12 +68,12 @@ class cCubicNoise public: /** Maximum size of each dimension of the query arrays. */ static const int MAX_SIZE = 512; - - + + /** Creates a new instance with the specified seed. */ cCubicNoise(int a_Seed); - - + + /** Fills a 2D array with the values of the noise. */ void Generate2D( NOISE_DATATYPE * a_Array, ///< Array to generate into [x + a_SizeX * y] @@ -81,8 +81,8 @@ public: NOISE_DATATYPE a_StartX, NOISE_DATATYPE a_EndX, ///< Noise-space coords of the array in the X direction NOISE_DATATYPE a_StartY, NOISE_DATATYPE a_EndY ///< Noise-space coords of the array in the Y direction ) const; - - + + /** Fills a 3D array with the values of the noise. */ void Generate3D( NOISE_DATATYPE * a_Array, ///< Array to generate into [x + a_SizeX * y + a_SizeX * a_SizeY * z] @@ -91,9 +91,9 @@ public: NOISE_DATATYPE a_StartY, NOISE_DATATYPE a_EndY, ///< Noise-space coords of the array in the Y direction NOISE_DATATYPE a_StartZ, NOISE_DATATYPE a_EndZ ///< Noise-space coords of the array in the Z direction ) const; - + protected: - + /** Noise used for integral random values. */ cNoise m_Noise; @@ -115,8 +115,8 @@ protected: -/** Improved noise, as described by Ken Perlin: http://mrl.nyu.edu/~perlin/paper445.pdf -Implementation adapted from Perlin's Java implementation: http://mrl.nyu.edu/~perlin/noise/ */ +/** Improved noise, as described by Ken Perlin: https://mrl.nyu.edu/~perlin/paper445.pdf +Implementation adapted from Perlin's Java implementation: https://mrl.nyu.edu/~perlin/noise/ */ class cImprovedNoise { public: @@ -132,8 +132,8 @@ public: NOISE_DATATYPE a_StartX, NOISE_DATATYPE a_EndX, ///< Noise-space coords of the array in the X direction NOISE_DATATYPE a_StartY, NOISE_DATATYPE a_EndY ///< Noise-space coords of the array in the Y direction ) const; - - + + /** Fills a 3D array with the values of the noise. */ void Generate3D( NOISE_DATATYPE * a_Array, ///< Array to generate into [x + a_SizeX * y + a_SizeX * a_SizeY * z] @@ -324,12 +324,3 @@ inline NOISE_DATATYPE ClampedLerp(NOISE_DATATYPE a_Val1, NOISE_DATATYPE a_Val2, } return Lerp(a_Val1, a_Val2, a_Ratio); } - - - - - - - - - |