diff options
author | Alexander Harkness <me@bearbin.net> | 2015-12-19 15:51:20 +0100 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2015-12-19 15:51:20 +0100 |
commit | f764df1a3aa2ce4fd5771d66974fe93c970f9e20 (patch) | |
tree | bdc9006f78ba8ae91e26213130d07e67124b044f /src/Noise/Noise.h | |
parent | Merge pull request #2774 from cuberite/worktycho-patch-1 (diff) | |
parent | Added HTTPS links wherever they are supported. (diff) | |
download | cuberite-f764df1a3aa2ce4fd5771d66974fe93c970f9e20.tar cuberite-f764df1a3aa2ce4fd5771d66974fe93c970f9e20.tar.gz cuberite-f764df1a3aa2ce4fd5771d66974fe93c970f9e20.tar.bz2 cuberite-f764df1a3aa2ce4fd5771d66974fe93c970f9e20.tar.lz cuberite-f764df1a3aa2ce4fd5771d66974fe93c970f9e20.tar.xz cuberite-f764df1a3aa2ce4fd5771d66974fe93c970f9e20.tar.zst cuberite-f764df1a3aa2ce4fd5771d66974fe93c970f9e20.zip |
Diffstat (limited to 'src/Noise/Noise.h')
-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); } - - - - - - - - - |