Struct amethyst_renderer::Mesh [−][src]
pub struct Mesh { /* fields omitted */ }
Represents a polygonal mesh.
Methods
impl Mesh
[src]
impl Mesh
pub fn build<D, V>(verts: D) -> MeshBuilder<((D, PhantomData<V>), ())> where
D: AsRef<[V]>,
V: VertexFormat,
[src]
pub fn build<D, V>(verts: D) -> MeshBuilder<((D, PhantomData<V>), ())> where
D: AsRef<[V]>,
V: VertexFormat,
Builds a new mesh from the given vertices.
pub fn buffer(&self, attributes: Attributes) -> Option<&RawBuffer<Resources>>
[src]
pub fn buffer(&self, attributes: Attributes) -> Option<&RawBuffer<Resources>>
Returns the mesh's vertex buffer which matches requested attributes
pub fn slice(&self) -> &Slice<Resources>
[src]
pub fn slice(&self) -> &Slice<Resources>
Returns associated Slice
pub fn transform(&self) -> Matrix4<f32>
[src]
pub fn transform(&self) -> Matrix4<f32>
Returns the transformation matrix of the mesh.
This four-by-four matrix applies translation, rotation, and scaling to the mesh. It is often referred to in the computer graphics industry as the "model matrix".
Trait Implementations
impl Asset for Mesh
[src]
impl Asset for Mesh
const NAME: &'static str
NAME: &'static str = "renderer::Mesh"
An identifier for this asset used for debugging.
type Data = MeshData
The Data
type the asset can be created from.
type HandleStorage = VecStorage<MeshHandle>
The ECS storage type to be used. You'll want to use VecStorage
in most cases.
impl SimpleFormat<Mesh> for ObjFormat
[src]
impl SimpleFormat<Mesh> for ObjFormat
const NAME: &'static str
NAME: &'static str = "WAVEFRONT_OBJ"
A unique identifier for this format.
type Options = ()
Options specific to the format, which are passed to import
. E.g. for textures this would be stuff like mipmap levels and sampler info. Read more
fn import(&self, bytes: Vec<u8>, _: ()) -> Result<MeshData>
[src]
fn import(&self, bytes: Vec<u8>, _: ()) -> Result<MeshData>
Produces asset data from given bytes.
impl Clone for Mesh
[src]
impl Clone for Mesh
fn clone(&self) -> Mesh
[src]
fn clone(&self) -> Mesh
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Mesh
[src]
impl Debug for Mesh