[−][src]Struct noise::Curve
Noise function that maps the output value from the source function onto an arbitrary function curve.
This noise function maps the output value from the source function onto an application-defined curve. The curve is defined by a number of control points; each control point has an input value that maps to an output value.
To add control points to the curve, use the add_control_point
method.
Since the curve is a cubic spline, an application must have a minimum of four control points to the curve. If there is less than four control points, the get() method panics. Each control point can have any input and output value, although no two control points can have the same input.
Fields
source: &'a dyn NoiseFn<T>
Outputs a value.
Methods
impl<'a, T> Curve<'a, T>
[src]
pub fn new(source: &'a dyn NoiseFn<T>) -> Self
[src]
pub fn add_control_point(self, input_value: f64, output_value: f64) -> Self
[src]
Trait Implementations
Auto Trait Implementations
impl<'a, T> !Send for Curve<'a, T>
impl<'a, T> Unpin for Curve<'a, T>
impl<'a, T> !Sync for Curve<'a, T>
impl<'a, T> !UnwindSafe for Curve<'a, T>
impl<'a, T> !RefUnwindSafe for Curve<'a, T>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,