Skip to main content

CyclicCubicGenerator

Trait CyclicCubicGenerator 

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

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

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

This makes sense only when the control data can be interpreted cyclically.

Required Associated Types§

Source

type Error

An error type indicating why construction might fail.

Required Methods§

Source

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

Build a cyclic CubicCurve by computing the interpolation coefficients for each curve segment, treating the control data as cyclic so that the result is a closed curve.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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

Available on crate feature alloc only.
Source§

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

Available on crate feature alloc only.
Source§

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

Available on crate feature alloc only.
Source§

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

Available on crate feature alloc only.