[−][src]Struct nannou::draw::mesh::Mesh
The custom mesh type used internally by the Draw API.
Methods
impl<S> Mesh<S>
[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.
pub fn points(&self) -> &[Point<S>]
[src]
The Mesh's vertex position channel.
pub fn indices(&self) -> &[u32]
[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>]
[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: u32)
[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 = u32>,
[src]
I: IntoIterator<Item = u32>,
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 = u32>,
[src]
V: IntoIterator<Item = Vertex<S>>,
I: IntoIterator<Item = u32>,
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.
pub fn raw_vertices(&self) -> RawVertices<&Self>
[src]
Produce an iterator yielding all raw (non-index-order) vertices.
pub fn into_raw_vertices(self) -> RawVertices<Self>
[src]
Consume self and produce an iterator yielding all raw (non-index_order) vertices.
impl<S> Mesh<S> where
S: Clone,
[src]
S: Clone,
pub fn extend_from_slices(
&mut self,
points: &[Point<S>],
indices: &[u32],
colors: &[Color],
tex_coords: &[TexCoords<S>]
)
[src]
&mut self,
points: &[Point<S>],
indices: &[u32],
colors: &[Color],
tex_coords: &[TexCoords<S>]
)
Extend the mesh from the given slices.
This is faster than extend
which uses iteration internally.
**Panic!**s if the length of the given points, colors and tex_coords slices do not match.
pub fn extend_vertices_from_slices(
&mut self,
points: &[Point<S>],
colors: &[Color],
tex_coords: &[TexCoords<S>]
)
[src]
&mut self,
points: &[Point<S>],
colors: &[Color],
tex_coords: &[TexCoords<S>]
)
Extend the mesh with the given slices of vertices.
pub fn extend_indices_from_slice(&mut self, indices: &[u32])
[src]
Extend the mesh with the given slices of vertices.
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.
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> 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]
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: Debug> Debug for Mesh<S>
[src]
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]
impl<S> DerefMut for Mesh<S>
[src]
impl<S> GetVertex<u32> for Mesh<S> where
S: Clone,
[src]
S: Clone,
type Vertex = Vertex<S>
The vertex type representing all channels of data within the mesh at a single index.
fn get_vertex(&self, index: u32) -> Option<Self::Vertex>
[src]
impl<S> Indices for Mesh<S>
[src]
type Index = u32
The type used to index into the vertex buffer.
type Indices = Indices
The channel type containing indices.
fn indices(&self) -> &Self::Indices
[src]
impl<S> Points for Mesh<S>
[src]
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> PushIndex for Mesh<S>
[src]
type Index = u32
The inner index type.
fn push_index(&mut self, index: Self::Index)
[src]
fn extend_indices<I>(&mut self, indices: I) where
I: IntoIterator<Item = Self::Index>,
[src]
I: IntoIterator<Item = Self::Index>,
impl<S> PushVertex<WithTexCoords<WithColor<Vector3<S>, Alpha<Rgb<Linear<Srgb>, f32>, f32>>, Vector2<S>>> for Mesh<S>
[src]
fn push_vertex(&mut self, v: Vertex<S>)
[src]
impl<S> TexCoords for Mesh<S>
[src]
Auto Trait Implementations
impl<S> RefUnwindSafe for Mesh<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for Mesh<S> where
S: Send,
S: Send,
impl<S> Sync for Mesh<S> where
S: Sync,
S: Sync,
impl<S> Unpin for Mesh<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for Mesh<S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> Clear for T where
T: ClearIndices + ClearVertices,
[src]
T: ClearIndices + ClearVertices,
impl<T, U> ConvertInto<U> for T where
U: ConvertFrom<T>,
[src]
U: ConvertFrom<T>,
fn convert_into(self) -> U
[src]
fn convert_unclamped_into(self) -> U
[src]
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<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>,
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> 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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,