pub struct Curve<T, Source, const DIM: usize>where
Source: NoiseFn<T, DIM>,{
pub source: Source,
/* private fields */
}
Expand description
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: Source
Outputs a value.
Implementations
Trait Implementations
Auto Trait Implementations
impl<T, Source, const DIM: usize> RefUnwindSafe for Curve<T, Source, DIM>where
Source: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, Source, const DIM: usize> Send for Curve<T, Source, DIM>where
Source: Send,
T: Send,
impl<T, Source, const DIM: usize> Sync for Curve<T, Source, DIM>where
Source: Sync,
T: Sync,
impl<T, Source, const DIM: usize> Unpin for Curve<T, Source, DIM>where
Source: Unpin,
T: Unpin,
impl<T, Source, const DIM: usize> UnwindSafe for Curve<T, Source, DIM>where
Source: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more