Genmesh's is a library that offers ways to generate and manipulate vertex streams.
The core problem that this library solves is to find a nice way to build meshes that
does not just result in throwing all the vertices and indices into a
calling it done. While doing so is simple from a library writers point of view, the
consumer will often have to translate that buffer to the format that they need before
it can be used. This produces needless buffering that can be avoided.
Genmesh's solution is to utilize the
Iterator trait to build a vertex processing
Iterator trait has a number of useful functions like
collect that are useful in themselves.
Genmesh includes a number of traits that
can be used with the built in
Iterator traits to build the meshes that your engine
A collection of utilties that can be used to build meshes programmatically.
Represents a line
Neighbors search accelerating structure.
A polygon with 4 points. Maps to
A polygon with 3 points. Maps to
Used to iterator of polygons into a iterator of triangles
Common vertex type.
an iterator that breaks a polygon down into its individual verticies.
This is All-the-types container. This exists since some generators
Convert a Polygon into it's fragments
provides a way to convert a polygon down to triangles
A trait defining how to defined an Indexer. An indexer is a object that collects verticies and emits indexes for the vertex. The intent is that an Indexer can find redundent vertexes and deduplicate them by returning aliased indexes.
Creates an LinesIterator from another Iterator
This acts very similar to a vertex shader. It gives a way to manipulate and modify the vertices in a polygon. This is useful if you need to scale the mesh using a matrix multiply, or just for modifying the type of each vertex.
Supplies a way to convert an iterator of polygons to an iterator of vertices. Useful for when you need to write the vertices into a graphics pipeline.
Common vertex normal type.
Common vertex position type.