Struct noise::Worley
[−]
[src]
pub struct Worley { pub range_function: RangeFunction, pub enable_range: bool, pub frequency: f64, pub displacement: f64, // some fields omitted }
Noise function that outputs Worley noise.
Fields
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: f64
Frequency of the seed points.
displacement: f64
Scale of the random displacement to apply to each cell.
The noise function 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 Worley
[src]
const DEFAULT_SEED: u32
DEFAULT_SEED: u32 = 0
const DEFAULT_RANGEFUNCTION: RangeFunction
DEFAULT_RANGEFUNCTION: RangeFunction = RangeFunction::Euclidean
const DEFAULT_FREQUENCY: f64
DEFAULT_FREQUENCY: f64 = 1.0
const DEFAULT_DISPLACEMENT: f64
DEFAULT_DISPLACEMENT: f64 = 1.0
fn new() -> Self
[src]
fn set_range_function(self, range_function: RangeFunction) -> Self
[src]
Sets the range function used by the Worley cells.
fn enable_range(self, enable_range: bool) -> Self
[src]
Enables or disables applying the distance from the nearest seed point to the output value.
fn set_frequency(self, frequency: f64) -> Self
[src]
Sets the frequency of the seed points.
fn set_displacement(self, displacement: f64) -> Self
[src]
Trait Implementations
impl Clone for Worley
[src]
fn clone(&self) -> Worley
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Worley
[src]
impl Debug for Worley
[src]
impl Default for Worley
[src]
impl Seedable for Worley
[src]
fn set_seed(self, seed: u32) -> Self
[src]
Sets the seed value used by the Worley cells.
fn seed(&self) -> u32
[src]
Getter to retrieve the seed from the function