Struct gfx::render::mesh::Mesh
[−]
[src]
pub struct Mesh<R: Resources> { pub num_vertices: VertexCount, pub attributes: Vec<Attribute<R>>, }
Describes geometry to render.
Fields
num_vertices: VertexCount
Number of vertices in the mesh.
attributes: Vec<Attribute<R>>
Vertex attributes to use.
Methods
impl<R: Resources> Mesh<R>
[src]
fn new(nv: VertexCount) -> Mesh<R>
Create a new mesh, which is a TriangleList
with no attributes and nv
vertices.
fn from_format<V: VertexFormat>(buf: Buffer<R, V>, nv: VertexCount) -> Mesh<R>
Create a new Mesh
from a struct that implements VertexFormat
and a buffer.
fn from_format_instanced<V: VertexFormat, U: VertexFormat>(buf: Buffer<R, V>, nv: VertexCount, inst: Buffer<R, U>) -> Mesh<R>
Create a new intanced Mesh
given a vertex buffer and an instance buffer.
nv
is the number of vertices of the repeated mesh.
Trait Implementations
impl<R: PartialEq + Resources> PartialEq for Mesh<R>
[src]
fn eq(&self, __arg_0: &Mesh<R>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Mesh<R>) -> bool
This method tests for !=
.
impl<R: Hash + Resources> Hash for Mesh<R>
[src]
fn hash<__HR: Hasher>(&self, __arg_0: &mut __HR)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl<R: Eq + Resources> Eq for Mesh<R>
[src]
impl<R: Debug + Resources> Debug for Mesh<R>
[src]
impl<R: Clone + Resources> Clone for Mesh<R>
[src]
fn clone(&self) -> Mesh<R>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<R: Resources> ToSlice<R> for Mesh<R>
[src]
fn to_slice(&self, ty: PrimitiveType) -> Slice<R>
Return a vertex slice of the whole mesh.