[−][src]Struct nannou::draw::mesh::Mesh
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> 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]
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]
impl<S> Indices for Mesh<S>
[src]
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]
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]
impl<S> PushVertex<WithTexCoords<WithColor<Vector3<S>, Alpha<Rgb<f32>, f32>>, Vector2<S>>> for Mesh<S>
[src]
fn push_vertex(&mut self, v: Vertex<S>)
[src]
impl<S> PushIndex for Mesh<S>
[src]
fn push_index(&mut self, index: usize)
[src]
fn extend_indices<I>(&mut self, indices: I) where
I: IntoIterator<Item = usize>,
[src]
I: IntoIterator<Item = usize>,
impl<S> ClearIndices for Mesh<S>
[src]
fn clear_indices(&mut self)
[src]
impl<S> ClearVertices for Mesh<S>
[src]
fn clear_vertices(&mut self)
[src]
impl<S: Clone> Clone for Mesh<S>
[src]
fn clone(&self) -> 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]
Auto Trait Implementations
Blanket Implementations
impl<T> Clear for T where
T: ClearIndices + ClearVertices,
[src]
T: ClearIndices + ClearVertices,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Content for T
[src]
fn ref_from_ptr(ptr: *mut c_void, size: usize) -> Option<*mut T>
[src]
fn is_size_suitable(size: usize) -> bool
[src]
fn indiv_size() -> usize
[src]
impl<T> SafeBorrow<T> for T
[src]
impl<T> Erased for T
impl<S> FromSample<S> for S
[src]
fn from_sample_(s: S) -> S
[src]
impl<T, U> ToSample<U> for T where
U: FromSample<T>,
[src]
U: FromSample<T>,
fn to_sample_(self) -> U
[src]
impl<S, T> Duplex<S> for T where
T: FromSample<S> + ToSample<S>,
[src]
T: FromSample<S> + ToSample<S>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
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>,
T: Parameter<Self>,
Sets value
as a parameter of self
.