Trait nannou::mesh::PushIndex

source ·
pub trait PushIndex {
    type Index;

    // Required method
    fn push_index(&mut self, index: Self::Index);

    // Provided method
    fn extend_indices<I>(&mut self, indices: I)
       where I: IntoIterator<Item = Self::Index> { ... }
}
Expand description

Meshes that contain an Indices channel and can push new indices to it.

Required Associated Types§

source

type Index

The inner index type.

Required Methods§

source

fn push_index(&mut self, index: Self::Index)

Push a new index onto the indices channel.

Provided Methods§

source

fn extend_indices<I>(&mut self, indices: I)
where I: IntoIterator<Item = Self::Index>,

Extend the Mesh’s Indices channel with the given indices.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, M> PushIndex for &'a mut M
where M: PushIndex,

§

type Index = <M as PushIndex>::Index

source§

fn push_index(&mut self, index: <&'a mut M as PushIndex>::Index)

source§

fn extend_indices<I>(&mut self, indices: I)
where I: IntoIterator<Item = <&'a mut M as PushIndex>::Index>,

source§

impl<'a, M> PushIndex for RefMut<'a, M>
where M: PushIndex,

§

type Index = <M as PushIndex>::Index

source§

fn push_index(&mut self, index: <RefMut<'a, M> as PushIndex>::Index)

source§

fn extend_indices<I>(&mut self, indices: I)
where I: IntoIterator<Item = <RefMut<'a, M> as PushIndex>::Index>,

Implementors§

source§

impl PushIndex for Mesh

§

type Index = u32

source§

impl<M, C> PushIndex for WithColors<M, C>
where M: PushIndex,

§

type Index = <M as PushIndex>::Index

source§

impl<M, I> PushIndex for WithIndices<M, Vec<I>>

§

type Index = I

source§

impl<M, N> PushIndex for WithNormals<M, N>
where M: PushIndex,

§

type Index = <M as PushIndex>::Index

source§

impl<M, T> PushIndex for WithTexCoords<M, T>
where M: PushIndex,

§

type Index = <M as PushIndex>::Index