[][src]Trait genmesh::MapToVertices

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.

Loading content...

Required methods

fn vertex<F>(self, map: F) -> MapToVerticesIter<Self, T, U, F> where
    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.

Loading content...

Implementors

impl<VIn, VOut, P, POut: MapVertex<VIn, VOut, Output = P>, T: Iterator<Item = POut>> MapToVertices<VIn, VOut> for T[src]

type Output = P

Loading content...