Skip to main content

ParameterRefinable

Trait ParameterRefinable 

Source
pub trait ParameterRefinable<S: Scalar, const C: usize> {
    // Required methods
    fn evaluate_cartesian(&self, t: S) -> GeopResult<Vector<S, C>>;
    fn tangent_cartesian(&self, t: S) -> GeopResult<Vector<S, C>>;
}
Expand description

Bridges a NurbCurve<S, D>’s Cartesian evaluation (D = 4 -> 3-D points, D = 3 -> 2-D pcurve points) so NurbCurve::refine_parameter_at_point can be written once for both — stable Rust’s const generics cannot express C = D - 1 directly.

Required Methods§

Source

fn evaluate_cartesian(&self, t: S) -> GeopResult<Vector<S, C>>

Source

fn tangent_cartesian(&self, t: S) -> GeopResult<Vector<S, C>>

The Cartesian tangent, via each dimension’s own tangent. Not the derivative() curve: that is the homogeneous derivative, whose weight component is zero for a non-rational curve, so evaluating it as a rational curve fails outright.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<S: Scalar> ParameterRefinable<S, 2> for NurbCurve<S, 3>

Source§

impl<S: Scalar> ParameterRefinable<S, 3> for NurbCurve<S, 4>