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
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
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
Implementors
impl IndexedPolygon<Polygon<usize>> for Circle
impl IndexedPolygon<Triangle<usize>> for Cone
impl IndexedPolygon<Quad<usize>> for Cube
impl IndexedPolygon<Polygon<usize>> for Cylinder
impl IndexedPolygon<Triangle<usize>> for IcoSphere
impl IndexedPolygon<Quad<usize>> for Plane
impl IndexedPolygon<Polygon<usize>> for SphereUv
impl IndexedPolygon<Quad<usize>> for Torus