[][src]Trait rust_3d::IsTopologyUnit

pub trait IsTopologyUnit {
    fn n_vids() -> usize;
fn vid(&self, index: usize) -> Result<VId>; fn for_each_vid(&self, f: &mut dyn FnMut(VId)) { ... } }

IsTopologyUnit trait used for single units of a topology. E.g. size 1 for paths, size 3 for tri meshes, size 4 for quad meshes

Required methods

fn n_vids() -> usize

Should return the number of indices a unit is defined with. (e.g. 3 for a tri mesh)

fn vid(&self, index: usize) -> Result<VId>

Should return the vertex id of the nth element of this unit. Failure if index out of bounds

Loading content...

Provided methods

fn for_each_vid(&self, f: &mut dyn FnMut(VId))

Applies the provided function to all indices within this unit

Loading content...

Implementors

impl IsTopologyUnit for Face3[src]

Loading content...