Skip to main content

SampleTwoDerivatives

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.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<P> SampleTwoDerivatives<P> for CubicCurve<P>
where P: VectorSpace<Scalar = f32>,

Available on crate feature alloc only.
Source§

impl<P> SampleTwoDerivatives<P> for CubicSegment<P>
where P: VectorSpace<Scalar = f32>,

Source§

impl<P> SampleTwoDerivatives<P> for RationalCurve<P>
where P: VectorSpace<Scalar = f32>,

Available on crate feature alloc only.
Source§

impl<P> SampleTwoDerivatives<P> for RationalSegment<P>
where P: VectorSpace<Scalar = f32>,

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> SampleTwoDerivatives<T> for ForeverCurve<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> SampleTwoDerivatives<T> for ConstantCurve<T>
where T: HasTangent + Clone,

Source§

impl<U, V, S, T, C, D> SampleTwoDerivatives<(S, T)> for ZipCurve<S, T, C, D>
where U: VectorSpace<Scalar = f32>, V: VectorSpace<Scalar = f32>, S: HasTangent<Tangent = U>, T: HasTangent<Tangent = V>, C: SampleTwoDerivatives<S>, D: SampleTwoDerivatives<T>,

Source§

impl<V, T, C, D> SampleTwoDerivatives<T> for CurveReparamCurve<T, C, D>
where V: VectorSpace<Scalar = f32>, T: HasTangent<Tangent = V>, C: SampleTwoDerivatives<T>, D: SampleTwoDerivatives<f32>,

Source§

impl<V, T, C> SampleTwoDerivatives<(f32, T)> for GraphCurve<T, C>
where V: VectorSpace<Scalar = f32>, T: HasTangent<Tangent = V>, C: SampleTwoDerivatives<T>,

Source§

impl<V, T, C> SampleTwoDerivatives<T> for LinearReparamCurve<T, C>
where V: VectorSpace<Scalar = f32>, T: HasTangent<Tangent = V>, C: SampleTwoDerivatives<T>,