panda3d.core.StackedPerlinNoise2

class StackedPerlinNoise2

Implements a multi-layer PerlinNoise, with one or more high-frequency noise functions added to a lower-frequency base noise function.

Inheritance diagram

Inheritance diagram of StackedPerlinNoise2

__init__() → None

Creates a StackedPerlinNoise2 object with no levels. You should call addLevel() to add each level by hand.

__init__(copy: StackedPerlinNoise2) → None

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) → None

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).

assign(copy: StackedPerlinNoise2) → StackedPerlinNoise2
Return type

StackedPerlinNoise2

addLevel(level: PerlinNoise2, amp: float) → None

Adds an arbitrary PerlinNoise2 object, and an associated amplitude, to the stack.

clear() → None

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.

noise(x: float, y: float) → float

Returns the noise function of the three inputs.