Noise2D
Noise
These functions actually generate noise values into the passed in destination array.
Note that the output values of these functions are from -1.0 to 1.0.
fBm - Fractal Brownian Motion - A simple noise generation algorithm, it tends to generate either flowing rounded hills or rounded mountainous shapes.
Private Types
enum
Constants { SIZE = 0x100 SIZE_MASK = 0x0ff }
Private Attributes
Private Functions
Detailed Description
Noise
These functions actually generate noise values into the passed in destination array.
Note that the output values of these functions are from -1.0 to 1.0.
fBm - Fractal Brownian Motion - A simple noise generation algorithm, it tends to generate either flowing rounded hills or rounded mountainous shapes.
fBm(Vector< F32 > * dst, U32 size, U32 interval, F32 h, F32 octave)
rigidMultiFractal(Vector< F32 > * dst, Vector< F32 > * signal, U32 size, U32 interval, F32 h, F32 octave)
rigidMultiFractal Creates ridged mountains with a high frequency detail.
Private Types
Constants
Enumerator
- SIZE = 0x100
- SIZE_MASK = 0x0ff
Private Attributes
F32 mGradient [SIZE+SIZE+2][2]
S32 mPermutation [SIZE+SIZE+2]
MRandom mRandom
U32 mSeed
Private Functions
curve(F32 t)
dot(const F32 * q, F32 rx, F32 ry)
lerp(F32 t, F32 a, F32 b)
normalize(F32 v)
setup(F32 t, S32 & b0, S32 & b1, F32 & r0, F32 & r1)
Public Functions
Noise2D()
~Noise2D()
erodeHydraulic(Vector< F32 > * src, Vector< F32 > * dst, U32 iterations, U32 size)
erodeThermal(Vector< F32 > * src, Vector< F32 > * dst, F32 slope, F32 materialLoss, U32 iterations, U32 size, U32 squareSize, F32 maxHeight)
getMinMax(Vector< F32 > * src, F32 * maxNoise, F32 * minNoise, U32 size)
getSeed()
getValue(F32 u, F32 v, S32 interval)
setSeed(U32 seed)
turbulence(F32 x, F32 y, F32 freq)