pub struct Worley {
    pub distance_function: Rc<dyn Fn(&[f64], &[f64]) -> f64>,
    pub return_type: ReturnType,
    pub frequency: f64,
    /* private fields */
}
Expand description

Noise function that outputs Worley noise.

Fields

distance_function: Rc<dyn Fn(&[f64], &[f64]) -> f64>

Specifies the distance function to use when calculating the boundaries of the cell.

return_type: ReturnType

Signifies whether the distance from the borders of the cell should be returned, or the value for the cell.

frequency: f64

Frequency of the seed points.

Implementations

Sets the distance function used by the Worley cells.

Enables or disables applying the distance from the nearest seed point to the output value.

Sets the frequency of the seed points.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. Read more

Sets the seed value used by the Worley cells.

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.