Struct re_renderer::LineStripSeriesBuilder
source · pub struct LineStripSeriesBuilder {
pub vertices: Vec<LineVertex>,
pub batches: Vec<LineBatchInfo>,
pub strips: Vec<LineStripInfo>,
/* private fields */
}Expand description
Builder for a vector of line strips, making it easy to create crate::renderer::LineDrawData.
TODO(andreas): We could make significant optimizations here by making this builder capable of writing to a GPU readable memory location. This will require some ahead of time size limit, but should be feasible. But before that we first need to sort out cpu->gpu transfers better by providing staging buffers.
Fields§
§vertices: Vec<LineVertex>§batches: Vec<LineBatchInfo>§strips: Vec<LineStripInfo>Implementations§
source§impl LineStripSeriesBuilder
impl LineStripSeriesBuilder
pub fn new(ctx: &RenderContext) -> Self
sourcepub fn radius_boost_in_ui_points_for_outlines(
self,
radius_boost_in_ui_points_for_outlines: f32
) -> Self
pub fn radius_boost_in_ui_points_for_outlines( self, radius_boost_in_ui_points_for_outlines: f32 ) -> Self
Boosts the size of the points by the given amount of ui-points for the purpose of drawing outlines.
sourcepub fn batch(&mut self, label: impl Into<DebugLabel>) -> LineBatchBuilder<'_>
pub fn batch(&mut self, label: impl Into<DebugLabel>) -> LineBatchBuilder<'_>
Start of a new batch.
pub fn iter_vertices_by_batch( &self ) -> impl Iterator<Item = (&LineBatchInfo, impl Iterator<Item = &LineVertex>)>
sourcepub fn into_draw_data(
self,
ctx: &mut RenderContext
) -> Result<LineDrawData, LineDrawDataError>
pub fn into_draw_data( self, ctx: &mut RenderContext ) -> Result<LineDrawData, LineDrawDataError>
Finalizes the builder and returns a line draw data with all the lines added so far.
pub fn is_empty(&self) -> bool
pub fn default_box_flags() -> LineStripFlags
Auto Trait Implementations§
impl !RefUnwindSafe for LineStripSeriesBuilder
impl !Send for LineStripSeriesBuilder
impl !Sync for LineStripSeriesBuilder
impl Unpin for LineStripSeriesBuilder
impl !UnwindSafe for LineStripSeriesBuilder
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