[][src]Trait plexus::index::Grouping

pub trait Grouping: StaticArity {
    type Group;

Associated Types

type Group

Loading content...


impl<A, N> Grouping for Flat<A, N> where
    A: NonZero + Unsigned,
    N: Copy + Integer + Unsigned

type Group = N

Flat index buffers directly contain indices. These indices are implicitly grouped by the arity of the buffer.

impl<P> Grouping for P where
    P: Topological,
    P::Vertex: Copy + Integer + Unsigned

Structured index buffer grouping.

Describes a structured index buffer of triangles, quadrilaterals, etc. Useful if a buffer representing a mesh comprised of both triangles and quadrilaterals is needed.

Unlike flat groupings, structured groupings can be specified directly using a topological type like Trigon<usize> or BoundedPolygon<usize>.


Creating a MeshBuffer with a structured index buffer:

use plexus::buffer::MeshBuffer;
use plexus::prelude::*;
use plexus::primitive::BoundedPolygon;

let mut buffer = MeshBuffer::<BoundedPolygon<usize>, (f64, f64, f64)>::default();

type Group = P

Topological index buffers contain $n$-gons that explicitly group their indices.

Loading content...