Struct noise::Turbulence
[−]
[src]
pub struct Turbulence<Source, T> { pub source: Source, pub seed: usize, pub frequency: T, pub power: T, pub roughness: usize, // some fields omitted }
Noise Module that randomly displaces the input value before returning the output value from the source module.
Turbulence 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 module. To control the turbulence, an application can modify its frequency, its power, and its roughness.
Fields
source: Source
Source Module that outputs a value.
seed: usize
Seed value for the Turbulence module.
frequency: T
Frequency value for the Turbulence module.
power: T
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.
Methods
impl<Source, T> Turbulence<Source, T> where
T: Float,
[src]
T: Float,
fn new(source: Source) -> Turbulence<Source, T>
fn set_frequency(self, frequency: T) -> Turbulence<Source, T>
fn set_power(self, power: T) -> Turbulence<Source, T>
fn set_roughness(self, roughness: usize) -> Turbulence<Source, T>
Trait Implementations
impl<Source, T> Seedable for Turbulence<Source, T>
[src]
fn set_seed(self, seed: usize) -> Turbulence<Source, T>
impl<Source, T> NoiseModule<Point2<T>> for Turbulence<Source, T> where
Source: NoiseModule<Point2<T>, Output = T>,
T: Float,
[src]
Source: NoiseModule<Point2<T>, Output = T>,
T: Float,
impl<Source, T> NoiseModule<Point3<T>> for Turbulence<Source, T> where
Source: NoiseModule<Point3<T>, Output = T>,
T: Float,
[src]
Source: NoiseModule<Point3<T>, Output = T>,
T: Float,
impl<Source, T> NoiseModule<Point4<T>> for Turbulence<Source, T> where
Source: NoiseModule<Point4<T>, Output = T>,
T: Float,
[src]
Source: NoiseModule<Point4<T>, Output = T>,
T: Float,