Struct noise::Worley
[−]
[src]
pub struct Worley<T> { pub seed: usize, pub range_function: RangeFunction, pub enable_range: bool, pub frequency: T, pub displacement: T, // some fields omitted }
Noise module that outputs Worley noise.
Fields
seed: usize
Seed.
range_function: RangeFunction
Specifies the range function to use when calculating the boundaries of the cell.
enable_range: bool
Determines if the distance from the nearest seed point is applied to the output value.
frequency: T
Frequency of the seed points.
displacement: T
Scale of the random displacement to apply to each cell.
The noise module assigns each Worley cell a random constant value from
a value noise function. The displacement
value controls the range
random values to assign to each cell. The range of random values is +/-
the displacement value.
Methods
impl<T> Worley<T> where
T: Float,
[src]
T: Float,
fn new() -> Worley<T>
fn set_range_function(self, range_function: RangeFunction) -> Worley<T>
Sets the range function used by the Worley cells.
fn enable_range(self, enable_range: bool) -> Worley<T>
Enables or disables applying the distance from the nearest seed point to the output value.
fn set_frequency(self, frequency: T) -> Worley<T>
Sets the frequency of the seed points.
fn set_displacement(self, displacement: T) -> Worley<T>
Trait Implementations
impl<T: Clone> Clone for Worley<T>
[src]
fn clone(&self) -> Worley<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more