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

pub trait Grouping {
    type Item;
}

Associated Types

type Item

Loading content...

Implementors

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

type Item = 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 + NumCast + Unsigned
[src]

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 primitive type like Trigon<usize> or Polygon<usize>.

Examples

Creating a MeshBuffer with a structured index buffer:

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

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

type Item = P

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

Loading content...