StackedPerlinNoise2
from panda3d.core import StackedPerlinNoise2
- class StackedPerlinNoise2
Bases:
Implements a multi-layer
PerlinNoise
, with one or more high-frequency noise functions added to a lower-frequency base noise function.Inheritance diagram
- __call__(value: LVecBase2d) float
- __call__(value: LVecBase2f) float
- __init__()
Creates a
StackedPerlinNoise2
object with no levels. You should calladdLevel()
to add each level by hand.
- __init__(copy: StackedPerlinNoise2)
Creates an exact duplicate of the existing
StackedPerlinNoise2
object, including the random seed.
- __init__(sx: float, sy: float, num_levels: int, scale_factor: float, amp_scale: float, table_size: int, seed: int)
Creates num_levels nested
PerlinNoise2
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).
- addLevel(level: PerlinNoise2, amp: float)
Adds an arbitrary
PerlinNoise2
object, and an associated amplitude, to the stack.
- assign(copy: StackedPerlinNoise2) StackedPerlinNoise2
- clear()
Removes all levels from the stack. You must call
addLevel()
again to restore them.
- noise(value: LVecBase2d) float
Returns the noise function of the three inputs.
- noise(value: LVecBase2f) float
Returns the noise function of the three inputs.