[][src]Struct plexus::index::Flat

pub struct Flat<A = U3, N = usize> where
    A: NonZero + Unsigned,
    N: Copy + Integer + NumCast + Unsigned
{ /* fields omitted */ }

Flat index buffer meta-grouping.

Describes a flat index buffer with a constant arity. Arity is specified using a type constant from the typenum crate.

Unlike structured groupings, this meta-grouping is needed to associate an index type with an arity. For example, Vec<usize> implements both IndexBuffer<Flat3<usize>> (a triangular buffer) and IndexBuffer<Flat4<usize>> (a quadrilateral buffer).

Examples

Creating a MeshBuffer with a flat and triangular index buffer:

use plexus::buffer::MeshBuffer;
use plexus::index::Flat;
use plexus::prelude::*;
use plexus::U3;

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

Trait Implementations

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

type Index = N

The type of individual indices in the buffer.

impl<A, N, P> Push<Flat<A, N>, P> for Vec<N> where
    A: NonZero + Unsigned,
    N: Copy + Integer + NumCast + Unsigned,
    P: ConstantArity + IntoVertices + Topological<Vertex = N>, 
[src]

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<A: Debug, N: Debug> Debug for Flat<A, N> where
    A: NonZero + Unsigned,
    N: Copy + Integer + NumCast + Unsigned
[src]

Auto Trait Implementations

impl<A, N> Send for Flat<A, N> where
    A: Send,
    N: Send

impl<A, N> Sync for Flat<A, N> where
    A: Sync,
    N: Sync

impl<A, N> Unpin for Flat<A, N> where
    A: Unpin,
    N: Unpin

impl<A, N> UnwindSafe for Flat<A, N> where
    A: UnwindSafe,
    N: UnwindSafe

impl<A, N> RefUnwindSafe for Flat<A, N> where
    A: RefUnwindSafe,
    N: RefUnwindSafe

Blanket Implementations

impl<P> Grouping for P where
    P: Topological,
    <P as Topological>::Vertex: Copy,
    <P as Topological>::Vertex: Integer,
    <P as Topological>::Vertex: NumCast,
    <P as Topological>::Vertex: Unsigned
[src]

type Item = P

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

impl<T> FromGeometry<T> for T[src]

impl<T, U> IntoGeometry<U> for T where
    U: FromGeometry<T>, 
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,