[−][src]Struct rendy_mesh::MeshBuilder
Generics-free mesh builder.
Methods
impl<'a> MeshBuilder<'a>
[src]
pub fn new() -> Self
[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) -> Self where
I: Into<Indices<'a>>,
[src]
I: Into<Indices<'a>>,
Set indices buffer to the MeshBuilder
pub fn set_indices<I>(&mut self, indices: I) -> &mut Self where
I: Into<Indices<'a>>,
[src]
I: Into<Indices<'a>>,
Set indices buffer to the MeshBuilder
pub fn with_vertices<V, D>(self, vertices: D) -> Self where
V: AsVertex + 'a,
D: Into<Cow<'a, [V]>>,
[src]
V: AsVertex + 'a,
D: Into<Cow<'a, [V]>>,
Add another vertices to the MeshBuilder
pub fn add_vertices<V, D>(&mut self, vertices: D) -> &mut Self where
V: AsVertex + 'a,
D: Into<Cow<'a, [V]>>,
[src]
V: AsVertex + 'a,
D: Into<Cow<'a, [V]>>,
Add another vertices to the MeshBuilder
pub fn with_prim_type(self, prim: Primitive) -> Self
[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 Self
[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]
&self,
queue: QueueId,
factory: &Factory<B>
) -> Result<Mesh<B>, Error> where
B: Backend,
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> Clone for MeshBuilder<'a>
[src]
fn clone(&self) -> MeshBuilder<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a, A> From<Vec<A>> for MeshBuilder<'a> where
A: AsVertex + 'a,
[src]
A: AsVertex + 'a,
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]
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,
fn from(
vertices: (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>)
) -> Self
[src]
vertices: (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>)
) -> Self
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]
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,
fn from(
vertices: (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>)
) -> Self
[src]
vertices: (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>)
) -> Self
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]
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,
fn from(
vertices: (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>)
) -> Self
[src]
vertices: (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>)
) -> Self
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]
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,
fn from(
vertices: (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>)
) -> Self
[src]
vertices: (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>)
) -> Self
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]
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,
fn from(
vertices: (Vec<E>, Vec<F>, Vec<G>, Vec<H>, Vec<I>, Vec<J>, Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)
) -> Self
[src]
vertices: (Vec<E>, Vec<F>, Vec<G>, Vec<H>, Vec<I>, Vec<J>, Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)
) -> Self
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]
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,
fn from(
vertices: (Vec<F>, Vec<G>, Vec<H>, Vec<I>, Vec<J>, Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)
) -> Self
[src]
vertices: (Vec<F>, Vec<G>, Vec<H>, Vec<I>, Vec<J>, Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)
) -> Self
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]
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,
fn from(
vertices: (Vec<G>, Vec<H>, Vec<I>, Vec<J>, Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)
) -> Self
[src]
vertices: (Vec<G>, Vec<H>, Vec<I>, Vec<J>, Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)
) -> Self
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]
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,
fn from(
vertices: (Vec<H>, Vec<I>, Vec<J>, Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)
) -> Self
[src]
vertices: (Vec<H>, Vec<I>, Vec<J>, Vec<K>, Vec<L>, Vec<M>, Vec<N>, Vec<O>, Vec<P>)
) -> Self
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]
I: AsVertex + 'a,
J: AsVertex + 'a,
K: AsVertex + 'a,
L: AsVertex + 'a,
M: AsVertex + 'a,
N: AsVertex + 'a,
O: AsVertex + 'a,
P: AsVertex + 'a,
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]
J: AsVertex + 'a,
K: AsVertex + 'a,
L: AsVertex + 'a,
M: AsVertex + 'a,
N: AsVertex + 'a,
O: AsVertex + 'a,
P: AsVertex + 'a,
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]
K: AsVertex + 'a,
L: AsVertex + 'a,
M: AsVertex + 'a,
N: AsVertex + 'a,
O: AsVertex + 'a,
P: AsVertex + 'a,
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]
L: AsVertex + 'a,
M: AsVertex + 'a,
N: AsVertex + 'a,
O: AsVertex + 'a,
P: AsVertex + 'a,
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]
M: AsVertex + 'a,
N: AsVertex + 'a,
O: AsVertex + 'a,
P: AsVertex + 'a,
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]
N: AsVertex + 'a,
O: AsVertex + 'a,
P: AsVertex + 'a,
impl<'a, O, P> From<(Vec<O>, Vec<P>)> for MeshBuilder<'a> where
O: AsVertex + 'a,
P: AsVertex + 'a,
[src]
O: AsVertex + 'a,
P: AsVertex + 'a,
impl<'a, P> From<(Vec<P>,)> for MeshBuilder<'a> where
P: AsVertex + 'a,
[src]
P: AsVertex + 'a,
impl<'a> From<()> for MeshBuilder<'a>
[src]
impl<'a> Debug for MeshBuilder<'a>
[src]
impl<'a> Serialize for MeshBuilder<'a>
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de: 'a, 'a> Deserialize<'de> for MeshBuilder<'a>
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Supports<T> for T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> SetParameter for T
[src]
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
[src]
T: Parameter<Self>,
Sets value
as a parameter of self
.