Trait genmesh::MapToVertices
[−]
[src]
pub trait MapToVertices<T, U>: Sized { type Output; fn vertex<F>(self, map: F) -> MapToVerticesIter<Self, T, U, F>
where
F: FnMut(T) -> U; }
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.
Associated Types
type Output
Output
should be a a container of the same shape of the type
It's internal values should reflect any transformation the map did.
Required Methods
fn vertex<F>(self, map: F) -> MapToVerticesIter<Self, T, U, F> where
F: FnMut(T) -> U,
F: FnMut(T) -> U,
from a iterator of polygons, produces a iterator of polygons. Each vertex in the process is modified with the suppled function.