[][src]Struct amethyst_rendy::rendy::mesh::MeshBuilder

pub struct MeshBuilder<'a> { /* fields omitted */ }

Generics-free mesh builder.

Methods

impl<'a> MeshBuilder<'a>[src]

pub fn new() -> MeshBuilder<'a>[src]

Create empty builder.

pub fn into_owned(self) -> MeshBuilder<'static>[src]

Convert builder into fully owned type. This forces internal vertex and index buffers to be cloned, which allows borrowed source buffers to be released.

pub fn with_indices<I>(self, indices: I) -> MeshBuilder<'a> where
    I: Into<Indices<'a>>, 
[src]

Set indices buffer to the MeshBuilder

pub fn set_indices<I>(&mut self, indices: I) -> &mut MeshBuilder<'a> where
    I: Into<Indices<'a>>, 
[src]

Set indices buffer to the MeshBuilder

pub fn with_vertices<V, D>(self, vertices: D) -> MeshBuilder<'a> where
    D: Into<Cow<'a, [V]>>,
    V: AsVertex + 'a, 
[src]

Add another vertices to the MeshBuilder

pub fn add_vertices<V, D>(&mut self, vertices: D) -> &mut MeshBuilder<'a> where
    D: Into<Cow<'a, [V]>>,
    V: AsVertex + 'a, 
[src]

Add another vertices to the MeshBuilder

pub fn with_prim_type(self, prim: Primitive) -> MeshBuilder<'a>[src]

Sets the primitive type of the mesh.

By default, meshes are constructed as triangle lists.

pub fn set_prim_type(&mut self, prim: Primitive) -> &mut MeshBuilder<'a>[src]

Sets the primitive type of the mesh.

By default, meshes are constructed as triangle lists.

pub fn build<B>(
    &self,
    queue: QueueId,
    factory: &Factory<B>
) -> Result<Mesh<B>, Error> where
    B: Backend
[src]

Builds and returns the new mesh.

A mesh expects all vertex buffers to have the same number of elements. If those are not equal, the length of smallest vertex buffer is selected, effectively discaring extra data from larger buffers.

Note that contents of index buffer is not validated.

Trait Implementations

impl<'a, D, E, F, G, H, I, J, K, L, M, N, O, P> From<(Vec<D>, Vec<E>, Vec<F>, Vec<G>, Vec<H>, Vec<I>, Vec<J>, Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)> for MeshBuilder<'a> where
    D: AsVertex + 'a,
    E: AsVertex + 'a,
    F: AsVertex + 'a,
    G: AsVertex + 'a,
    H: AsVertex + 'a,
    I: AsVertex + 'a,
    J: AsVertex + 'a,
    K: AsVertex + 'a,
    L: AsVertex + 'a,
    M: AsVertex + 'a,
    N: AsVertex + 'a,
    O: AsVertex + 'a,
    P: AsVertex + 'a, 
[src]

impl<'a, I, J, K, L, M, N, O, P> From<(Vec<I>, Vec<J>, Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)> for MeshBuilder<'a> where
    I: AsVertex + 'a,
    J: AsVertex + 'a,
    K: AsVertex + 'a,
    L: AsVertex + 'a,
    M: AsVertex + 'a,
    N: AsVertex + 'a,
    O: AsVertex + 'a,
    P: AsVertex + 'a, 
[src]

impl<'a, O, P> From<(Vec<O>, Vec<P>)> for MeshBuilder<'a> where
    O: AsVertex + 'a,
    P: AsVertex + 'a, 
[src]

impl<'a, J, K, L, M, N, O, P> From<(Vec<J>, Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)> for MeshBuilder<'a> where
    J: AsVertex + 'a,
    K: AsVertex + 'a,
    L: AsVertex + 'a,
    M: AsVertex + 'a,
    N: AsVertex + 'a,
    O: AsVertex + 'a,
    P: AsVertex + 'a, 
[src]

impl<'a, K, L, M, N, O, P> From<(Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)> for MeshBuilder<'a> where
    K: AsVertex + 'a,
    L: AsVertex + 'a,
    M: AsVertex + 'a,
    N: AsVertex + 'a,
    O: AsVertex + 'a,
    P: AsVertex + 'a, 
[src]

impl<'a, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> From<(Vec<B>, Vec<C>, Vec<D>, Vec<E>, Vec<F>, Vec<G>, Vec<H>, Vec<I>, Vec<J>, Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)> for MeshBuilder<'a> where
    B: AsVertex + 'a,
    C: AsVertex + 'a,
    D: AsVertex + 'a,
    E: AsVertex + 'a,
    F: AsVertex + 'a,
    G: AsVertex + 'a,
    H: AsVertex + 'a,
    I: AsVertex + 'a,
    J: AsVertex + 'a,
    K: AsVertex + 'a,
    L: AsVertex + 'a,
    M: AsVertex + 'a,
    N: AsVertex + 'a,
    O: AsVertex + 'a,
    P: AsVertex + 'a, 
[src]

impl<'a, H, I, J, K, L, M, N, O, P> From<(Vec<H>, Vec<I>, Vec<J>, Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)> for MeshBuilder<'a> where
    H: AsVertex + 'a,
    I: AsVertex + 'a,
    J: AsVertex + 'a,
    K: AsVertex + 'a,
    L: AsVertex + 'a,
    M: AsVertex + 'a,
    N: AsVertex + 'a,
    O: AsVertex + 'a,
    P: AsVertex + 'a, 
[src]

impl<'a, C, D, E, F, G, H, I, J, K, L, M, N, O, P> From<(Vec<C>, Vec<D>, Vec<E>, Vec<F>, Vec<G>, Vec<H>, Vec<I>, Vec<J>, Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)> for MeshBuilder<'a> where
    C: AsVertex + 'a,
    D: AsVertex + 'a,
    E: AsVertex + 'a,
    F: AsVertex + 'a,
    G: AsVertex + 'a,
    H: AsVertex + 'a,
    I: AsVertex + 'a,
    J: AsVertex + 'a,
    K: AsVertex + 'a,
    L: AsVertex + 'a,
    M: AsVertex + 'a,
    N: AsVertex + 'a,
    O: AsVertex + 'a,
    P: AsVertex + 'a, 
[src]

impl<'a, M, N, O, P> From<(Vec<M>, Vec<N>, Vec<O>, Vec<P>)> for MeshBuilder<'a> where
    M: AsVertex + 'a,
    N: AsVertex + 'a,
    O: AsVertex + 'a,
    P: AsVertex + 'a, 
[src]

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> From<(Vec<A>, Vec<B>, Vec<C>, Vec<D>, Vec<E>, Vec<F>, Vec<G>, Vec<H>, Vec<I>, Vec<J>, Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)> for MeshBuilder<'a> where
    A: AsVertex + 'a,
    B: AsVertex + 'a,
    C: AsVertex + 'a,
    D: AsVertex + 'a,
    E: AsVertex + 'a,
    F: AsVertex + 'a,
    G: AsVertex + 'a,
    H: AsVertex + 'a,
    I: AsVertex + 'a,
    J: AsVertex + 'a,
    K: AsVertex + 'a,
    L: AsVertex + 'a,
    M: AsVertex + 'a,
    N: AsVertex + 'a,
    O: AsVertex + 'a,
    P: AsVertex + 'a, 
[src]

impl<'a, N, O, P> From<(Vec<N>, Vec<O>, Vec<P>)> for MeshBuilder<'a> where
    N: AsVertex + 'a,
    O: AsVertex + 'a,
    P: AsVertex + 'a, 
[src]

impl<'a, E, F, G, H, I, J, K, L, M, N, O, P> From<(Vec<E>, Vec<F>, Vec<G>, Vec<H>, Vec<I>, Vec<J>, Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)> for MeshBuilder<'a> where
    E: AsVertex + 'a,
    F: AsVertex + 'a,
    G: AsVertex + 'a,
    H: AsVertex + 'a,
    I: AsVertex + 'a,
    J: AsVertex + 'a,
    K: AsVertex + 'a,
    L: AsVertex + 'a,
    M: AsVertex + 'a,
    N: AsVertex + 'a,
    O: AsVertex + 'a,
    P: AsVertex + 'a, 
[src]

impl<'a, A> From<Vec<A>> for MeshBuilder<'a> where
    A: AsVertex + 'a, 
[src]

impl<'a, F, G, H, I, J, K, L, M, N, O, P> From<(Vec<F>, Vec<G>, Vec<H>, Vec<I>, Vec<J>, Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)> for MeshBuilder<'a> where
    F: AsVertex + 'a,
    G: AsVertex + 'a,
    H: AsVertex + 'a,
    I: AsVertex + 'a,
    J: AsVertex + 'a,
    K: AsVertex + 'a,
    L: AsVertex + 'a,
    M: AsVertex + 'a,
    N: AsVertex + 'a,
    O: AsVertex + 'a,
    P: AsVertex + 'a, 
[src]

impl<'a> From<()> for MeshBuilder<'a>[src]

impl<'a, P> From<(Vec<P>,)> for MeshBuilder<'a> where
    P: AsVertex + 'a, 
[src]

impl<'a, G, H, I, J, K, L, M, N, O, P> From<(Vec<G>, Vec<H>, Vec<I>, Vec<J>, Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)> for MeshBuilder<'a> where
    G: AsVertex + 'a,
    H: AsVertex + 'a,
    I: AsVertex + 'a,
    J: AsVertex + 'a,
    K: AsVertex + 'a,
    L: AsVertex + 'a,
    M: AsVertex + 'a,
    N: AsVertex + 'a,
    O: AsVertex + 'a,
    P: AsVertex + 'a, 
[src]

impl<'a, L, M, N, O, P> From<(Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)> for MeshBuilder<'a> where
    L: AsVertex + 'a,
    M: AsVertex + 'a,
    N: AsVertex + 'a,
    O: AsVertex + 'a,
    P: AsVertex + 'a, 
[src]

impl<'de, 'a> Deserialize<'de> for MeshBuilder<'a> where
    'de: 'a, 
[src]

impl<'a> Serialize for MeshBuilder<'a>[src]

impl<'a> Debug for MeshBuilder<'a>[src]

impl<'a> Clone for MeshBuilder<'a>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl From<MeshBuilder<'static>> for MeshData[src]

Auto Trait Implementations

impl<'a> Unpin for MeshBuilder<'a>

impl<'a> Sync for MeshBuilder<'a>

impl<'a> Send for MeshBuilder<'a>

impl<'a> UnwindSafe for MeshBuilder<'a>

impl<'a> RefUnwindSafe for MeshBuilder<'a>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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]

fn adapt_into(self) -> D[src]

Convert the source color to the destination color using the bradford method by default Read more

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> SetParameter for T[src]

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 
[src]

Sets value as a parameter of self.

impl<T> Supports<T> for T[src]

impl<T> Erased for T[src]

impl<T> Serialize for T where
    T: Serialize + ?Sized
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> Resource for T where
    T: Any + Send + Sync
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> Event for T where
    T: Send + Sync + 'static, 
[src]

impl<T> Clone for T where
    T: Clone
[src]