pub struct VertexStream<V: Pod, B> { /* private fields */ }
Implementations§
Source§impl<V: Pod, B> VertexStream<V, B>
impl<V: Pod, B> VertexStream<V, B>
pub fn new(resize_count: usize) -> Self
pub fn fork(&self) -> Self
pub fn token(&self) -> VertexStreamToken
Sourcepub unsafe fn extract(&mut self, token: VertexStreamToken) -> Self
pub unsafe fn extract(&mut self, token: VertexStreamToken) -> Self
§Safety
By extracting part of stream, you might make this and new stream invalid!
pub fn transformed( &mut self, f: impl FnMut(&mut Self), t: impl FnMut(&mut V), ) -> &mut Self
pub fn triangle(&mut self, vertices: [V; 3]) -> &mut Self
pub fn triangle_fan( &mut self, vertices: impl IntoIterator<Item = V>, ) -> &mut Self
pub fn triangle_strip( &mut self, vertices: impl IntoIterator<Item = V>, ) -> &mut Self
pub fn quad(&mut self, vertices: [V; 4]) -> &mut Self
pub fn extend( &mut self, vertices: impl IntoIterator<Item = V>, triangles: impl IntoIterator<Item = Triangle>, ) -> &mut Self
Sourcepub unsafe fn extend_vertices(
&mut self,
iter: impl IntoIterator<Item = V>,
) -> &Self
pub unsafe fn extend_vertices( &mut self, iter: impl IntoIterator<Item = V>, ) -> &Self
§Safety
By writing raw vertices you might produce invalid renderables!
Sourcepub unsafe fn extend_triangles(
&mut self,
relative: bool,
iter: impl IntoIterator<Item = Triangle>,
) -> &Self
pub unsafe fn extend_triangles( &mut self, relative: bool, iter: impl IntoIterator<Item = Triangle>, ) -> &Self
§Safety
By writing raw triangles you might produce invalid renderables!
Sourcepub unsafe fn extend_batches(
&mut self,
iter: impl IntoIterator<Item = (B, Range<usize>)>,
) -> &Self
pub unsafe fn extend_batches( &mut self, iter: impl IntoIterator<Item = (B, Range<usize>)>, ) -> &Self
§Safety
By writing raw batches you might produce invalid renderables!
pub fn append(&mut self, other: &mut Self)
pub fn append_cloned(&mut self, other: &Self)where
B: Clone,
pub fn clear(&mut self)
pub fn batch(&mut self, data: B)
pub fn batch_optimized(&mut self, data: B)where
B: PartialEq,
pub fn batch_end(&mut self)
pub fn render<R: VertexStreamRenderer<V, B>>( &mut self, renderer: &mut R, ) -> Result<(), R::Error>
pub fn vertices(&self) -> &[V]
pub fn triangles(&self) -> &[Triangle]
pub fn batches(&self) -> &[(B, Range<usize>)]
pub fn drain( &mut self, ) -> (Drain<'_, V>, Drain<'_, Triangle>, Drain<'_, (B, Range<usize>)>)
Trait Implementations§
Auto Trait Implementations§
impl<V, B> Freeze for VertexStream<V, B>
impl<V, B> RefUnwindSafe for VertexStream<V, B>where
V: RefUnwindSafe,
B: RefUnwindSafe,
impl<V, B> Send for VertexStream<V, B>
impl<V, B> Sync for VertexStream<V, B>
impl<V, B> Unpin for VertexStream<V, B>
impl<V, B> UnwindSafe for VertexStream<V, B>where
V: UnwindSafe,
B: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more