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