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§
Sourcefn sample_with_two_derivatives_unchecked(&self, t: f32) -> WithTwoDerivatives<T>
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§
Sourcefn sample_with_two_derivatives(&self, t: f32) -> Option<WithTwoDerivatives<T>>
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.
Sourcefn sample_with_two_derivatives_clamped(&self, t: f32) -> WithTwoDerivatives<T>
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.