[−][src]Trait rust_3d::IsTopologyUnit
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
Provided methods
fn for_each_vid(&self, f: &mut dyn FnMut(VId))
Applies the provided function to all indices within this unit