StackedPerlinNoise3¶
-
class
StackedPerlinNoise3
¶ Implements a multi-layer
PerlinNoise
, with one or more high-frequency noise functions added to a lower-frequency base noise function.Inheritance diagram
-
StackedPerlinNoise3
(void)¶
-
explicit
StackedPerlinNoise3
(double sx, double sy, double sz, int num_levels = 3, double scale_factor = 4.0, double amp_scale = 0.5, int table_size = 256, unsigned long int seed = 0)¶
-
StackedPerlinNoise3
(StackedPerlinNoise3 const ©)¶ Creates a
StackedPerlinNoise3
object with no levels. You should calladd_level()
to add each level by hand.Creates num_levels nested
PerlinNoise3
objects. Each stacked Perlin object will have a scale of 1 scale_factor times the previous object (so that it is higher-frequency, if scale_factor > 1), and an amplitude of amp_scale times the previous object (so that it is less important, if amp_scale < 1).Creates an exact duplicate of the existing
StackedPerlinNoise3
object, including the random seed.
-
void
add_level
(PerlinNoise3 const &level, double amp = 1.0)¶ Adds an arbitrary
PerlinNoise3
object, and an associated amplitude, to the stack.
-
void
clear
(void)¶ Removes all levels from the stack. You must call
add_level()
again to restore them.
-
double
noise
(double x, double y, double z)¶
-
float
noise
(LVecBase3f const &value)¶
-
double
noise
(LVecBase3d const &value)¶ Returns the noise function of the three inputs.
-