Trait SampleTwoDerivatives

Source
pub trait SampleTwoDerivatives<T>: Curve<T>
where T: HasTangent,
{ // Required method fn sample_with_two_derivatives_unchecked( &self, t: f32, ) -> WithTwoDerivatives<T>; // Provided methods fn sample_with_two_derivatives( &self, t: f32, ) -> Option<WithTwoDerivatives<T>> { ... } fn sample_with_two_derivatives_clamped( &self, t: f32, ) -> WithTwoDerivatives<T> { ... } }
Expand description

A trait for curves that can sample two derivatives in addition to values.

Types that implement this trait automatically implement CurveWithTwoDerivatives; the curve produced by with_two_derivatives uses the sampling defined in the trait implementation.

Required Methods§

Source

fn sample_with_two_derivatives_unchecked(&self, t: f32) -> WithTwoDerivatives<T>

Sample this curve at the parameter value t, extracting the associated value in addition to two derivatives. This is the unchecked version of sampling, which should only be used if the sample time t is already known to lie within the curve’s domain.

See Curve::sample_unchecked for more information.

Provided Methods§

Source

fn sample_with_two_derivatives(&self, t: f32) -> Option<WithTwoDerivatives<T>>

Sample this curve’s value and two derivatives at the parameter value t, returning None if the point is outside of the curve’s domain.

Source

fn sample_with_two_derivatives_clamped(&self, t: f32) -> WithTwoDerivatives<T>

Sample this curve’s value and two derivatives at the parameter value t, clamping t to lie inside the domain of the curve.

Implementors§

Source§

impl<P> SampleTwoDerivatives<P> for CubicCurve<P>
where P: VectorSpace,

Source§

impl<P> SampleTwoDerivatives<P> for CubicSegment<P>
where P: VectorSpace,

Source§

impl<P> SampleTwoDerivatives<P> for RationalCurve<P>
where P: VectorSpace,

Source§

impl<P> SampleTwoDerivatives<P> for RationalSegment<P>
where P: VectorSpace,

Source§

impl<S, T, C, D> SampleTwoDerivatives<(S, T)> for ZipCurve<S, T, C, D>

Source§

impl<T> SampleTwoDerivatives<T> for ConstantCurve<T>
where T: HasTangent + Clone,

Source§

impl<T, C> SampleTwoDerivatives<(f32, T)> for GraphCurve<T, C>

Source§

impl<T, C> SampleTwoDerivatives<T> for ForeverCurve<T, C>

Source§

impl<T, C> SampleTwoDerivatives<T> for LinearReparamCurve<T, C>

Source§

impl<T, C> SampleTwoDerivatives<T> for PingPongCurve<T, C>

Source§

impl<T, C> SampleTwoDerivatives<T> for RepeatCurve<T, C>

Source§

impl<T, C> SampleTwoDerivatives<T> for ReverseCurve<T, C>

Source§

impl<T, C, D> SampleTwoDerivatives<T> for ChainCurve<T, C, D>

Source§

impl<T, C, D> SampleTwoDerivatives<T> for ContinuationCurve<T, C, D>

Source§

impl<T, C, D> SampleTwoDerivatives<T> for CurveReparamCurve<T, C, D>