Struct amethyst_renderer::MeshBuilder
[−]
pub struct MeshBuilder<D, V> { /* fields omitted */ }
Builds new meshes.
Methods
impl<D, V> MeshBuilder<D, V> where
D: AsRef<[V]>,
V: VertexFormat,
[src]
D: AsRef<[V]>,
V: VertexFormat,
fn new(verts: D) -> Self
Creates a new MeshBuilder
with the given vertices.
fn with_prim_type(self, prim: Primitive) -> Self
Sets the primitive type of the mesh.
By default, meshes are constructed as triangle lists.
fn with_position<P: Into<Point3<f32>>>(self, pos: P) -> Self
Sets the position of the mesh in 3D space.
fn with_rotation<Ax, An>(self, axis: Ax, angle: An) -> Self where
Ax: Into<Vector3<f32>>,
An: Into<Deg<f32>>,
Ax: Into<Vector3<f32>>,
An: Into<Deg<f32>>,
Rotates the mesh a certain number of degrees around the given axis.
fn with_scale(self, val: f32) -> Self
Scales the mesh size according to the given value.
fn with_transform<M: Into<Matrix4<f32>>>(self, mat: M) -> Self
Sets 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".
fn build(self, fac: &mut Factory) -> Result<Mesh>
Builds and returns the new mesh.
Trait Implementations
impl<D: Clone, V: Clone> Clone for MeshBuilder<D, V>
[src]
fn clone(&self) -> MeshBuilder<D, V>
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<D: Debug, V: Debug> Debug for MeshBuilder<D, V>
[src]
impl<D: PartialEq, V: PartialEq> PartialEq for MeshBuilder<D, V>
[src]
fn eq(&self, __arg_0: &MeshBuilder<D, V>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &MeshBuilder<D, V>) -> bool
This method tests for !=
.