Trait genmesh::generators::IndexedPolygon[][src]

pub trait IndexedPolygon<V>: Sized {
    fn indexed_polygon(&self, i: usize) -> V;
fn indexed_polygon_count(&self) -> usize; fn indexed_polygon_iter<'a>(&'a self) -> IndexedPolygonIterator<'a, Self, V> { ... } }

The IndexedPolygon trait is used with the SharedVertex trait in order to build a mesh. IndexedPolygon calculates each polygon face required to build an implementors mesh. each face is always returned in indexed form that points to the correct vertice supplied by the SharedVertex trait.

Required Methods

return a polygon with indices to the shared vertex

return the number of polygons that are needed to represent this mesh

Provided Methods

Important traits for IndexedPolygonIterator<'a, T, V>

create a iterator that will return a polygon for each face in the source mesh

Implementors