Function nannou_mesh::triangles[][src]

pub fn triangles<M, I>(mesh: M) -> Triangles<M> where
    M: Indices<Index = I> + GetVertex<I>,
    I: Copy + TryFrom<usize>, 
Expand description

Produce an iterator yielding triangles for every three vertices yielded in the order specified via the mesh’s Indices channel.

Requires that the mesh implements Indices and GetVertex.

Returns None when there are no longer enough vertex indices to produce a triangle.

Panics if the Indices channel produces an index that is out of bounds of the mesh’s vertices.