[][src]Struct nannou::noise::Curve

pub struct Curve<'a, T> where
    T: 'a, 
{ pub source: &'a (dyn NoiseFn<T> + 'a), // some fields omitted }

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> + 'a)

Outputs a value.

Implementations

impl<'a, T> Curve<'a, T>[src]

pub fn new(source: &'a (dyn NoiseFn<T> + 'a)) -> Curve<'a, T>[src]

pub fn add_control_point(
    self,
    input_value: f64,
    output_value: f64
) -> Curve<'a, T>
[src]

Trait Implementations

impl<'a, T> NoiseFn<T> for Curve<'a, T>[src]

Auto Trait Implementations

impl<'a, T> !RefUnwindSafe for Curve<'a, T>

impl<'a, T> !Send for Curve<'a, T>

impl<'a, T> !Sync for Curve<'a, T>

impl<'a, T> Unpin for Curve<'a, T>

impl<'a, T> !UnwindSafe for Curve<'a, T>

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,