Skip to main content

FrenetFrame

Trait FrenetFrame 

Source
pub trait FrenetFrame: Tangent + Curved {
    type Frame;

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

Query the full Frenet frame (T, N[, B]) at any point along a path.

In 2D the frame consists of the tangent and normal. In 3D it additionally includes the binormal.

Required Associated Types§

Source

type Frame

Frame type, e.g. (Tangent, Normal) in 2D or (T, N, B) in 3D.

Required Methods§

Source

fn frame_at(&self, s: Self::Scalar) -> Result<Self::Frame, Self::Error>

Frenet frame at arc-length s.

Returns an error when s is outside the domain or the frame cannot be computed (e.g. zero curvature in 3D).

Implementors§