Trait nannou::mesh::GetVertex

source ·
pub trait GetVertex<I> {
    type Vertex;

    // Required method
    fn get_vertex(&self, index: I) -> Option<Self::Vertex>;
}
Expand description

Mesh types that can be indexed to produce a vertex.

Required Associated Types§

source

type Vertex

The vertex type representing all channels of data within the mesh at a single index.

Required Methods§

source

fn get_vertex(&self, index: I) -> Option<Self::Vertex>

Create a vertex containing all channel properties for the given index.

Implementations on Foreign Types§

source§

impl<'a, M, I> GetVertex<I> for &'a M
where M: GetVertex<I>,

§

type Vertex = <M as GetVertex<I>>::Vertex

source§

fn get_vertex(&self, index: I) -> Option<<&'a M as GetVertex<I>>::Vertex>

source§

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

§

type Vertex = <M as GetVertex<I>>::Vertex

source§

fn get_vertex(&self, index: I) -> Option<<&'a mut M as GetVertex<I>>::Vertex>

source§

impl<'a, M, I> GetVertex<I> for Ref<'a, M>
where M: GetVertex<I>,

§

type Vertex = <M as GetVertex<I>>::Vertex

source§

fn get_vertex(&self, index: I) -> Option<<Ref<'a, M> as GetVertex<I>>::Vertex>

source§

impl<'a, M, I> GetVertex<I> for RefMut<'a, M>
where M: GetVertex<I>,

§

type Vertex = <M as GetVertex<I>>::Vertex

source§

fn get_vertex( &self, index: I ) -> Option<<RefMut<'a, M> as GetVertex<I>>::Vertex>

Implementors§

source§

impl GetVertex<u32> for Mesh

source§

impl<M, C, I> GetVertex<I> for WithColors<M, C>
where M: GetVertex<I>, C: Channel, <C as Channel>::Element: Clone, I: Copy + TryInto<usize>,

§

type Vertex = WithColor<<M as GetVertex<I>>::Vertex, <C as Channel>::Element>

source§

impl<M, I, Ix> GetVertex<Ix> for WithIndices<M, I>
where M: GetVertex<Ix>,

§

type Vertex = <M as GetVertex<Ix>>::Vertex

source§

impl<M, N, I> GetVertex<I> for WithNormals<M, N>
where M: GetVertex<I>, N: Channel, <N as Channel>::Element: Clone, I: Copy + TryInto<usize>,

§

type Vertex = WithNormal<<M as GetVertex<I>>::Vertex, <N as Channel>::Element>

source§

impl<M, T, I> GetVertex<I> for WithTexCoords<M, T>
where M: GetVertex<I>, T: Channel, <T as Channel>::Element: Clone, I: Copy + TryInto<usize>,

source§

impl<P, I> GetVertex<I> for MeshPoints<P>
where P: Channel, <P as Channel>::Element: Clone, I: TryInto<usize>,

§

type Vertex = <P as Channel>::Element