Struct spectra::spline::Spline [] [src]

pub struct Spline<T> { /* fields omitted */ }

Spline curve used to provide interpolation between control points (keys).

Methods

impl<T> Spline<T>
[src]

Create a new spline out of keys. The keys don’t have to be sorted because they’re sorted by this function.

Sample a spline at a given time.

Return

None if you try to sample a value at a time that has no key associated with. That can also happen if you try to sample between two keys with a specific interpolation mode that make the sampling impossible. For instance, Interpolate::CatmullRom requires four keys. If you’re near the beginning of the spline or its end, ensure you have enough keys around to make the sampling.

Sample a spline at a given time with clamping.

Return

If you sample before the first key or after the last one, return the first key or the last one, respectively.

Panic

This function panics if you have no key.

Trait Implementations

impl<T: Debug> Debug for Spline<T>
[src]

Formats the value using the given formatter.

impl<T: Clone> Clone for Spline<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T> Load for Spline<T> where
    T: SplineDeserializerAdapter
[src]

Arguments passed at loading.

TY_STR: &'static str = "splines"

impl<'a, T> IntoIterator for &'a Spline<T>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more