[][src]Struct nannou::draw::mesh::Mesh

pub struct Mesh<S = Default> { /* fields omitted */ }

The custom mesh type used internally by the Draw API.

Methods

impl<S> Mesh<S> where
    S: BaseNum
[src]

pub fn raw_vertex_count(&self) -> usize[src]

The number of raw vertices contained within the mesh.

pub fn vertex_count(&self) -> usize[src]

The number of vertices that would be yielded by a Vertices iterator for the given mesh.

pub fn triangle_count(&self) -> usize[src]

The number of triangles that would be yielded by a Triangles iterator for the given mesh.

Important traits for &'_ [u8]
pub fn points(&self) -> &[Point<S>][src]

The Mesh's vertex position channel.

Important traits for &'_ [u8]
pub fn indices(&self) -> &[usize][src]

The Mesh's vertex indices channel.

Important traits for &'_ [u8]
pub fn colors(&self) -> &[Color][src]

The Mesh's vertex colors channel.

Important traits for &'_ [u8]
pub fn tex_coords(&self) -> &[TexCoords<S>] where
    S: BaseFloat
[src]

The Mesh's vertex texture coordinates channel.

pub fn push_vertex(&mut self, v: Vertex<S>)[src]

Push the given vertex onto the inner channels.

pub fn push_index(&mut self, i: usize)[src]

Push the given index onto the inner Indices channel.

pub fn extend_vertices<I>(&mut self, vs: I) where
    I: IntoIterator<Item = Vertex<S>>, 
[src]

Extend the mesh channels with the given vertices.

pub fn extend_indices<I>(&mut self, is: I) where
    I: IntoIterator<Item = usize>, 
[src]

Extend the Mesh indices channel with the given indices.

pub fn extend<V, I>(&mut self, vs: V, is: I) where
    V: IntoIterator<Item = Vertex<S>>,
    I: IntoIterator<Item = usize>, 
[src]

Extend the Mesh with the given vertices and indices.

pub fn clear_vertices(&mut self)[src]

Clear all vertices from the mesh.

pub fn clear_indices(&mut self)[src]

Clear all indices from the mesh.

pub fn clear(&mut self)[src]

Clear all vertices and indices from the mesh.

Important traits for RawVertices<M>
pub fn raw_vertices(&self) -> RawVertices<&Self>[src]

Produce an iterator yielding all raw (non-index-order) vertices.

Important traits for Vertices<M>
pub fn vertices(&self) -> Vertices<&Self>[src]

Produce an iterator yielding all vertices in the order specified via the vertex indices.

pub fn triangles(&self) -> Triangles<&Self>[src]

Produce an iterator yielding all triangles.

Important traits for RawVertices<M>
pub fn into_raw_vertices(self) -> RawVertices<Self>[src]

Consume self and produce an iterator yielding all raw (non-index_order) vertices.

Important traits for Vertices<M>
pub fn into_vertices(self) -> Vertices<Self>[src]

Consume self and produce an iterator yielding all vertices in index-order.

pub fn into_triangles(self) -> Triangles<Self>[src]

Consume self and produce an iterator yielding all triangles.

Trait Implementations

impl<S> GetVertex for Mesh<S> where
    MeshType<S>: GetVertex<Vertex = Vertex<S>>, 
[src]

type Vertex = Vertex<S>

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

impl<S> Points for Mesh<S> where
    S: BaseNum
[src]

type Scalar = S

The scalar value used for the vertex coordinates.

type Point = Point<S>

The vertex type used to represent the location of a vertex.

type Points = Points<S>

The channel type containing points.

impl<S> Indices for Mesh<S>[src]

type Indices = Indices

The channel type containing indices.

impl<S> Colors for Mesh<S>[src]

type Color = Color

The color type stored within the channel.

type Colors = Colors

The channel type containing colors.

impl<S> TexCoords for Mesh<S> where
    S: BaseFloat
[src]

type TexCoordScalar = S

The scalar value used for the texture coordinates.

type TexCoords = TexCoords<S>

The channel type containing texture coordinates.

impl<S> PushVertex<WithTexCoords<WithColor<Vector3<S>, Alpha<Rgb<f32>, f32>>, Vector2<S>>> for Mesh<S>[src]

impl<S> PushIndex for Mesh<S>[src]

impl<S> ClearIndices for Mesh<S>[src]

impl<S> ClearVertices for Mesh<S>[src]

impl<S: Clone> Clone for Mesh<S>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<S> Default for Mesh<S>[src]

impl<S> DerefMut for Mesh<S>[src]

impl<S: Debug> Debug for Mesh<S>[src]

impl<S> Deref for Mesh<S>[src]

type Target = MeshType<S>

The resulting type after dereferencing.

Auto Trait Implementations

impl<S> Send for Mesh<S> where
    S: Send

impl<S> Sync for Mesh<S> where
    S: Sync

Blanket Implementations

impl<T> Clear for T where
    T: ClearIndices + ClearVertices
[src]

fn clear(&mut self)[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<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> Content for T[src]

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

impl<T> Erased for T

impl<S> FromSample<S> for S[src]

impl<T, U> ToSample<U> for T where
    U: FromSample<T>, 
[src]

impl<S, T> Duplex<S> for T where
    T: FromSample<S> + ToSample<S>, 
[src]

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.