pub trait Project: Path {
// Required method
fn project(&self, p: Self::Point) -> Result<Self::Scalar, Self::Error>;
// Provided method
fn closest_point(&self, p: Self::Point) -> Result<Self::Point, Self::Error> { ... }
}Expand description
Project a query point onto a path to find the nearest position.
Implementers should return the arc-length parameter of the closest point.
The default closest_point method combines project with sample_at to
produce the actual position.