Trait IndexedPolygon

Source
pub trait IndexedPolygon<V>: Sized {
    // Required methods
    fn indexed_polygon(&self, i: usize) -> V;
    fn indexed_polygon_count(&self) -> usize;

    // Provided method
    fn indexed_polygon_iter<'a>(&'a self) -> IndexedPolygonIterator<'a, Self, V>  { ... }
}
Expand description

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§

Source

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

return a polygon with indices to the shared vertex

Source

fn indexed_polygon_count(&self) -> usize

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

Provided Methods§

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§