Trait lyon_algorithms::walk::Pattern[][src]

pub trait Pattern {
    fn next(
        &mut self,
        position: Point,
        tangent: Vector,
        distance: f32
    ) -> Option<f32>; }

Types implementing the Pattern can be used to walk along a path at constant speed.

At each step, the pattern receives the position, tangent and already traversed distance along the path and returns the distance until the next step.

See the RegularPattern and RepeatedPattern implementations. This trait is also implemented for all functions/closures with signature FnMut(Point, Vector, f32) -> Option<f32>.

Required Methods

This method is invoked at each step along the path.

If this method returns None, path walking stops.

Implementors