[][src]Trait kurbo::ParamCurveDeriv

pub trait ParamCurveDeriv {
    type DerivResult: ParamCurve;
    fn deriv(&self) -> Self::DerivResult;

    fn gauss_arclen(&self, coeffs: &[(f64, f64)]) -> f64 { ... }
}

A differentiable parametrized curve.

Associated Types

type DerivResult: ParamCurve

The parametric curve obtained by taking the derivative of this one.

Loading content...

Required methods

fn deriv(&self) -> Self::DerivResult

The derivative of the curve.

Note that the type of the return value is somewhat inaccurate, as the derivative of a curve (mapping of param to point) is a mapping of param to vector. We choose to accept this rather than have a more complex type scheme.

Loading content...

Provided methods

fn gauss_arclen(&self, coeffs: &[(f64, f64)]) -> f64

Estimate arclength using Gaussian quadrature.

The coefficients are assumed to cover the range (-1..1), which is traditional.

Loading content...

Implementors

impl ParamCurveDeriv for ConstPoint[src]

impl ParamCurveDeriv for CubicBez[src]

impl ParamCurveDeriv for Line[src]

impl ParamCurveDeriv for QuadBez[src]

type DerivResult = Line

Loading content...