Struct nannou::draw::mesh::Mesh
[−]
[src]
pub struct Mesh<S = DefaultScalar> { /* fields omitted */ }
The custom mesh type used internally by the Draw API.
Methods
impl<S> Mesh<S> where
S: BaseNum,
[src]
S: BaseNum,
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.
pub fn points(&self) -> &[Point<S>]
[src]
The Mesh's vertex position channel.
pub fn indices(&self) -> &[usize]
[src]
The Mesh's vertex indices channel.
pub fn colors(&self) -> &[Color]
[src]
The Mesh's vertex colors channel.
pub fn tex_coords(&self) -> &[TexCoords<S>] where
S: BaseFloat,
[src]
S: BaseFloat,
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]
I: IntoIterator<Item = Vertex<S>>,
Extend the mesh channels with the given vertices.
pub fn extend_indices<I>(&mut self, is: I) where
I: IntoIterator<Item = usize>,
[src]
I: IntoIterator<Item = usize>,
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]
V: IntoIterator<Item = Vertex<S>>,
I: IntoIterator<Item = usize>,
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: Clone> Clone for Mesh<S>
[src]
fn clone(&self) -> Mesh<S>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<S: Debug> Debug for Mesh<S>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<S> Default for Mesh<S>
[src]
impl<S> Deref for Mesh<S>
[src]
type Target = MeshType<S>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.
impl<S> DerefMut for Mesh<S>
[src]
impl<S> GetVertex for Mesh<S> where
MeshType<S>: GetVertex<Vertex = Vertex<S>>,
[src]
MeshType<S>: GetVertex<Vertex = Vertex<S>>,
type Vertex = Vertex<S>
The vertex type representing all channels of data within the mesh at a single index.
fn get_vertex(&self, index: usize) -> Option<Self::Vertex>
[src]
Create a vertex containing all channel properties for the given index.
impl<S> Points for Mesh<S> where
S: BaseNum,
[src]
S: BaseNum,
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.
fn points(&self) -> &Self::Points
[src]
Borrow the vertex channel from the mesh.
impl<S> Indices for Mesh<S>
[src]
type Indices = Indices
The channel type containing indices.
fn indices(&self) -> &Self::Indices
[src]
Borrow the index channel from the mesh.
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.
fn colors(&self) -> &Self::Colors
[src]
Borrow the color channel from the mesh.
impl<S> TexCoords for Mesh<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type TexCoordScalar = S
The scalar value used for the texture coordinates.
type TexCoords = TexCoords<S>
The channel type containing texture coordinates.
fn tex_coords(&self) -> &Self::TexCoords
[src]
Borrow the texture coordinate channel from the mesh.
impl<S> PushVertex<Vertex<S>> for Mesh<S>
[src]
fn push_vertex(&mut self, v: Vertex<S>)
[src]
Push the given vertex onto the mesh. Read more
impl<S> PushIndex for Mesh<S>
[src]
fn push_index(&mut self, index: usize)
[src]
Push a new index onto the indices channel.
fn extend_indices<I>(&mut self, indices: I) where
I: IntoIterator<Item = usize>,
[src]
I: IntoIterator<Item = usize>,
Extend the Mesh's Indices channel with the given indices.
impl<S> ClearIndices for Mesh<S>
[src]
fn clear_indices(&mut self)
[src]
Clear all indices from the mesh.
impl<S> ClearVertices for Mesh<S>
[src]
fn clear_vertices(&mut self)
[src]
Clear all vertices from the mesh.