Struct noise::Turbulence [] [src]

pub struct Turbulence<'a, Source: 'a> {
    pub source: &'a Source,
    pub frequency: f64,
    pub power: f64,
    pub roughness: usize,
    // some fields omitted
}

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 function that outputs a value.

Frequency value for the Turbulence function.

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

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

Methods

impl<'a, Source> Turbulence<'a, Source>
[src]

DEFAULT_SEED: u32 = 0

DEFAULT_FREQUENCY: f64 = 1.0

DEFAULT_POWER: f64 = 1.0

DEFAULT_ROUGHNESS: usize = 3

[src]

[src]

[src]

[src]

Trait Implementations

impl<'a, Source: Clone + 'a> Clone for Turbulence<'a, Source>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a, Source: Debug + 'a> Debug for Turbulence<'a, Source>
[src]

[src]

Formats the value using the given formatter. Read more

impl<'a, Source> Seedable for Turbulence<'a, Source>
[src]

[src]

Set the seed for the function implementing the Seedable trait

[src]

Getter to retrieve the seed from the function

impl<'a, Source> NoiseFn<Point2<f64>> for Turbulence<'a, Source> where
    Source: NoiseFn<Point2<f64>>, 
[src]

[src]

impl<'a, Source> NoiseFn<Point3<f64>> for Turbulence<'a, Source> where
    Source: NoiseFn<Point3<f64>>, 
[src]

[src]

impl<'a, Source> NoiseFn<Point4<f64>> for Turbulence<'a, Source> where
    Source: NoiseFn<Point4<f64>>, 
[src]

[src]

Auto Trait Implementations

impl<'a, Source> Send for Turbulence<'a, Source> where
    Source: Sync

impl<'a, Source> Sync for Turbulence<'a, Source> where
    Source: Sync