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

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

fn indexed_polygon(&self, i: usize) -> V

return a polygon with indices to the shared vertex

fn indexed_polygon_count(&self) -> usize

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

Loading content...

Provided methods

Important traits for IndexedPolygonIterator<'a, T, V>
fn indexed_polygon_iter<'a>(&'a self) -> IndexedPolygonIterator<'a, Self, V>

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

Loading content...

Implementors

impl IndexedPolygon<Polygon<usize>> for Circle[src]

impl IndexedPolygon<Polygon<usize>> for Cylinder[src]

impl IndexedPolygon<Polygon<usize>> for SphereUv[src]

impl IndexedPolygon<Quad<usize>> for Cube[src]

impl IndexedPolygon<Quad<usize>> for Plane[src]

impl IndexedPolygon<Quad<usize>> for Torus[src]

impl IndexedPolygon<Triangle<usize>> for Cone[src]

impl IndexedPolygon<Triangle<usize>> for IcoSphere[src]

Loading content...