usemath::Point;usetrimesh::TriMesh;/// A sample point and its associated tangent.
pubenumPathSample<P: Point> {/// A point that starts a new path.
StartPoint(P,P::Vect),/// A point that is inside of the path currently generated.
InnerPoint(P,P::Vect),/// A point that ends the path currently generated.
EndPoint(P,P::Vect),/// Used when the sampler does not have any other points to generate.
EndOfSample
}/// A curve sampler.
pubtraitCurveSampler<P: Point> {/// Returns the next sample point.
fnnext(&mutself)->PathSample<P>;}/// A pattern that is replicated along a path.
////// It is responsible of the generation of the whole mesh.
pubtraitStrokePattern<P: Point> {/// Generates the mesh using this pattern and the curve sampled by `sampler`.
fnstroke<C:CurveSampler<P>>(&mutself, sampler:&mut C)->TriMesh<P>;}