Panda3D
|
This class provides an implementation of Perlin noise for 3 variables. More...
#include <pandadoc.hpp>
Public Member Functions | |
__init__ () | |
Randomizes the tables to make a unique noise function. | |
__init__ (const PerlinNoise3 copy) | |
Makes an exact copy of the existing PerlinNoise object, including its random seed. | |
__init__ (double sx, double sy, double sz, int table_size, unsigned long int seed) | |
Randomizes the tables to make a unique noise function. | |
double | noise (const LVecBase3d value) |
Returns the noise function of the three inputs. | |
float | noise (const LVecBase3f value) |
Returns the noise function of the three inputs. | |
double | noise (double x, double y, double z) |
Returns the noise function of the three inputs. | |
double | operator() (const LVecBase3d value) |
float | operator() (const LVecBase3f value) |
double | operator() (double x, double y, double z) |
PerlinNoise3 | operator= (const PerlinNoise3 copy) |
setScale (const LVecBase3d scale) | |
Changes the scale (frequency) of the noise. | |
setScale (const LVecBase3f scale) | |
Changes the scale (frequency) of the noise. | |
setScale (double scale) | |
Changes the scale (frequency) of the noise. | |
setScale (double sx, double sy, double sz) | |
Changes the scale (frequency) of the noise. | |
![]() | |
unsigned long int | getSeed () |
Returns a unique seed value based on the seed value passed to this PerlinNoise object (and on its current state). | |
This class provides an implementation of Perlin noise for 3 variables.
This code is loosely based on the reference implementation at http://mrl.nyu.edu/~perlin/noise/ .
__init__ | ( | ) |
Randomizes the tables to make a unique noise function.
Uses a default scale (noise frequency), table size, and seed.
__init__ | ( | const PerlinNoise3 | copy | ) |
Makes an exact copy of the existing PerlinNoise object, including its random seed.
__init__ | ( | double | sx, |
double | sy, | ||
double | sz, | ||
int | table_size, | ||
unsigned long int | seed ) |
Randomizes the tables to make a unique noise function.
If seed is nonzero, it is used to define the tables; if it is zero a random seed is generated.
double noise | ( | const LVecBase3d | value | ) |
Returns the noise function of the three inputs.
float noise | ( | const LVecBase3f | value | ) |
Returns the noise function of the three inputs.
double noise | ( | double | x, |
double | y, | ||
double | z ) |
Returns the noise function of the three inputs.
double operator() | ( | const LVecBase3d | value | ) |
float operator() | ( | const LVecBase3f | value | ) |
double operator() | ( | double | x, |
double | y, | ||
double | z ) |
PerlinNoise3 operator= | ( | const PerlinNoise3 | copy | ) |
setScale | ( | const LVecBase3d | scale | ) |
Changes the scale (frequency) of the noise.
setScale | ( | const LVecBase3f | scale | ) |
Changes the scale (frequency) of the noise.
setScale | ( | double | scale | ) |
Changes the scale (frequency) of the noise.
setScale | ( | double | sx, |
double | sy, | ||
double | sz ) |
Changes the scale (frequency) of the noise.