Skip to main content

Curved

Trait Curved 

Source
pub trait Curved: Path {
    type Curvature;

    // Required method
    fn curvature_at(
        &self,
        s: Self::Scalar,
    ) -> Result<Self::Curvature, Self::Error>;
}
Expand description

Query the curvature at any point along a path.

In 2D the curvature is a signed scalar (positive for left turns, negative for right turns). In 3D it is a curvature vector (κ · N).

Required Associated Types§

Source

type Curvature

The type representing curvature (scalar in 2D, vector in 3D).

Required Methods§

Source

fn curvature_at(&self, s: Self::Scalar) -> Result<Self::Curvature, Self::Error>

Curvature at arc-length s.

Returns an error when s is outside the domain or curvature is undefined at this point.

Implementors§

Source§

impl<P: Curved> Curved for Reverse<P>
where P::Curvature: Neg<Output = P::Curvature>,