KiCad PCB EDA Suite
|
#include <PerlinNoise.h>
Public Member Functions | |
PerlinNoise () | |
Initialize with the reference values for the permutation vector. | |
PerlinNoise (unsigned int seed) | |
Generate a new permutation vector based on the value of seed. | |
float | noise (float x, float y, float z) const |
float | noise (float x, float y) const |
Private Member Functions | |
float | fade (float t) const |
float | lerp (float t, float a, float b) const |
float | grad (int hash, float x, float y, float z) const |
float | grad (int hash, float x, float y) const |
Private Attributes | |
std::vector< int > | p |
Definition at line 55 of file PerlinNoise.h.
PerlinNoise::PerlinNoise | ( | ) |
Initialize with the reference values for the permutation vector.
Definition at line 55 of file PerlinNoise.cpp.
References p.
PerlinNoise::PerlinNoise | ( | unsigned int | seed | ) |
Generate a new permutation vector based on the value of seed.
Definition at line 80 of file PerlinNoise.cpp.
References p.
|
private |
Definition at line 168 of file PerlinNoise.cpp.
Referenced by noise().
|
private |
Definition at line 192 of file PerlinNoise.cpp.
|
private |
Definition at line 180 of file PerlinNoise.cpp.
Referenced by noise().
|
private |
Definition at line 174 of file PerlinNoise.cpp.
Referenced by noise().
float PerlinNoise::noise | ( | float | x, |
float | y | ||
) | const |
float PerlinNoise::noise | ( | float | x, |
float | y, | ||
float | z | ||
) | const |
Definition at line 100 of file PerlinNoise.cpp.
References BA, BB, fade(), grad(), lerp(), p, res, and X.
Referenced by BOARD_NORMAL::Generate(), COPPER_NORMAL::Generate(), PLATED_COPPER_NORMAL::Generate(), PLASTIC_NORMAL::Generate(), PLASTIC_SHINE_NORMAL::Generate(), BRUSHED_METAL_NORMAL::Generate(), and SILK_SCREEN_NORMAL::Generate().
|
private |
Definition at line 79 of file PerlinNoise.h.
Referenced by noise(), and PerlinNoise().