Skip to main content

RationalGenerator

Trait RationalGenerator 

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

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

Implement this on cubic splines that can generate a rational 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<RationalCurve<P>, Self::Error>

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

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>> RationalGenerator<P> for CubicNurbs<P>

Available on crate feature alloc only.