Struct noise::Curve [] [src]

pub struct Curve<Source, T> {
    pub source: Source,
    // some fields omitted
}

Noise module that maps the output value from the source module onto an arbitrary function curve.

This noise module maps the output value from the source module 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

Outputs a value.

Methods

impl<Source, T> Curve<Source, T> where
    T: Float
[src]

Trait Implementations

impl<Source, T, U> NoiseModule<T> for Curve<Source, U> where
    Source: NoiseModule<T, Output = U>,
    T: Copy,
    U: Float
[src]