CubicGenerator

Trait CubicGenerator 

Source
pub trait CubicGenerator<P: VectorSpace> {
    type Error;

    // Required method
    fn to_curve(&self) -> Result<CubicCurve<P>, Self::Error>;
}
Expand description

Implement this on cubic splines that can generate a cubic curve from their spline parameters.

Required Associated Types§

Source

type Error

An error type indicating why construction might fail.

Required Methods§

Source

fn to_curve(&self) -> Result<CubicCurve<P>, Self::Error>

Build a CubicCurve by computing the interpolation coefficients for each curve segment.

Implementors§

Source§

impl<P: VectorSpace> CubicGenerator<P> for LinearSpline<P>

Available on crate feature alloc only.
Source§

impl<P: VectorSpace<Scalar = f32>> CubicGenerator<P> for CubicBSpline<P>

Available on crate feature alloc only.
Source§

impl<P: VectorSpace<Scalar = f32>> CubicGenerator<P> for CubicBezier<P>

Available on crate feature alloc only.
Source§

impl<P: VectorSpace<Scalar = f32>> CubicGenerator<P> for CubicCardinalSpline<P>

Available on crate feature alloc only.
Source§

impl<P: VectorSpace<Scalar = f32>> CubicGenerator<P> for CubicHermite<P>

Available on crate feature alloc only.