bevy_math::cubic_splines

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.

Implementors§