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/.
More...
#include <Noise.h>
|
| cImprovedNoise (int a_Seed) |
| Constructs a new instance of the noise obbject. More...
|
|
void | Generate2D (NOISE_DATATYPE *a_Array, int a_SizeX, int a_SizeY, NOISE_DATATYPE a_StartX, NOISE_DATATYPE a_EndX, NOISE_DATATYPE a_StartY, NOISE_DATATYPE a_EndY) const |
| Fills a 2D array with the values of the noise. More...
|
|
void | Generate3D (NOISE_DATATYPE *a_Array, int a_SizeX, int a_SizeY, int a_SizeZ, NOISE_DATATYPE a_StartX, NOISE_DATATYPE a_EndX, NOISE_DATATYPE a_StartY, NOISE_DATATYPE a_EndY, NOISE_DATATYPE a_StartZ, NOISE_DATATYPE a_EndZ) const |
| Fills a 3D array with the values of the noise. More...
|
|
NOISE_DATATYPE | GetValueAt (int a_X, int a_Y, int a_Z) |
| Returns the value at the specified integral coords. More...
|
|
|
int | m_Perm [512] |
| The permutation table used by the noise function. More...
|
|
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/.
Definition at line 121 of file Noise.h.
◆ cImprovedNoise()
cImprovedNoise::cImprovedNoise |
( |
int |
a_Seed | ) |
|
Constructs a new instance of the noise obbject.
Note that this operation is quite expensive (the permutation array being constructed).
Definition at line 873 of file Noise.cpp.
◆ Fade()
Calculates the fade curve, 6 * t^5 - 15 * t^4 + 10 * t^3.
Definition at line 157 of file Noise.h.
◆ Generate2D()
Fills a 2D array with the values of the noise.
- Parameters
-
a_Array | Array to generate into [x + a_SizeX * y] |
a_SizeY | Count of the array, in each direction |
a_EndX | Noise-space coords of the array in the X direction |
a_EndY | Noise-space coords of the array in the Y direction |
Definition at line 900 of file Noise.cpp.
◆ Generate3D()
Fills a 3D array with the values of the noise.
- Parameters
-
a_Array | Array to generate into [x + a_SizeX * y + a_SizeX * a_SizeY * z] |
a_SizeZ | Count of the array, in each direction |
a_EndX | Noise-space coords of the array in the X direction |
a_EndY | Noise-space coords of the array in the Y direction |
a_EndZ | Noise-space coords of the array in the Z direction |
Definition at line 947 of file Noise.cpp.
◆ GetValueAt()
NOISE_DATATYPE cImprovedNoise::GetValueAt |
( |
int |
a_X, |
|
|
int |
a_Y, |
|
|
int |
a_Z |
|
) |
| |
Returns the value at the specified integral coords.
Used for raw speed measurement.
Definition at line 1013 of file Noise.cpp.
◆ Grad()
Returns the gradient value based on the hash.
Definition at line 163 of file Noise.h.
◆ m_Perm
int cImprovedNoise::m_Perm[512] |
|
protected |
The permutation table used by the noise function.
Initialized using seed.
Definition at line 153 of file Noise.h.
The documentation for this class was generated from the following files: