pub struct Turbulence<Source, F>where
    F: Default + Seedable,
{ pub source: Source, pub frequency: f64, pub power: f64, pub roughness: usize, /* private fields */ }
Expand description

Noise function that randomly displaces the input value before returning the output value from the source function.

_ is the pseudo-random displacement of the input value. The get() method randomly displaces the coordinates of the input value before retrieving the output value from the source function. To control the turbulence, an application can modify its frequency, its power, and its roughness.

Fields

source: Source

Source function that outputs a value.

frequency: f64

Frequency value for the Turbulence function.

power: f64

Controls the strength of the turbulence by affecting how much each point is moved.

roughness: usize

Affects the roughness of the turbulence. Higher values are rougher.

Implementations

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Set the seed for the function implementing the Seedable trait
Getter to retrieve the seed from the function

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.