|
Gin
|
Generates Perlin noise - a type of gradient noise with natural-looking characteristics. More...
#include <gin_util.h>
Public Member Functions | |
| PerlinNoise () | |
| Creates a PerlinNoise generator with the default permutation table. | |
| PerlinNoise (unsigned int seed) | |
| Creates a PerlinNoise generator with a randomized permutation table. | |
| T | noise (T x, T y=0, T z=0) |
| Generates a Perlin noise value at the specified coordinates. | |
Generates Perlin noise - a type of gradient noise with natural-looking characteristics.
Perlin noise is widely used in procedural generation for creating textures, terrain, and other organic-looking random variations. It produces smooth, coherent noise with controllable frequency and amplitude.
Based on the reference implementation by Ken Perlin. See: http://mrl.nyu.edu/~perlin/paper445.pdf
| PerlinNoise< T >::PerlinNoise | ( | ) |
Creates a PerlinNoise generator with the default permutation table.
| PerlinNoise< T >::PerlinNoise | ( | unsigned int | seed | ) |
Creates a PerlinNoise generator with a randomized permutation table.
| seed | The random seed used to generate the permutation table |
References shuffleArray().
| T PerlinNoise< T >::noise | ( | T | x, |
| T | y = 0, |
||
| T | z = 0 |
||
| ) |
Generates a Perlin noise value at the specified coordinates.
| x | The x coordinate |
| y | The y coordinate (defaults to 0 for 1D or 2D noise) |
| z | The z coordinate (defaults to 0 for 1D or 2D noise) |