Trait pasture_core::containers::PointBufferWriteable[][src]

pub trait PointBufferWriteable: PointBuffer {
    fn push(&mut self, points: &dyn PointBuffer);
fn splice(&mut self, range: Range<usize>, replace_with: &dyn PointBuffer);
fn clear(&mut self); }

Trait for all mutable PointBuffers, that is all PointBuffers where it is possible to push points into. Distinguishing between read-only PointBuffer and mutable PointBufferMut traits enables read-only, non-owning views of a PointBuffer with the same interface as an owning PointBuffer!

Required methods

fn push(&mut self, points: &dyn PointBuffer)[src]

Appends the given points to the end of the associated PointBuffer

Panics

Panics if points is neither an InterleavedPointBuffer nor a PerAttributePointBuffer. Note: All the builtin buffers supplied by Pasture always implement at least one of these traits, so it is always safe to call push with any of the builtin buffers.

fn splice(&mut self, range: Range<usize>, replace_with: &dyn PointBuffer)[src]

Replaces the specified range in the associated PointBuffer with the given replace_with buffer.

Panics

Panics if the starting point is greater than the end point or if the end point is greater than the length of the associated PointBuffer. Panics if the length of replace_with is less than the length of range Panics if replace_with is neither an InterleavedPointBuffer nor a PerAttributePointBuffer. Note: All the builtin buffers supplied by Pasture always implement at least one of these traits, so it is always safe to call splice with any of the builtin buffers.

fn clear(&mut self)[src]

Clears the contents of the associated PointBufferMut

Loading content...

Implementors

impl PointBufferWriteable for InterleavedVecPointStorage[src]

impl PointBufferWriteable for PerAttributeVecPointStorage[src]

Loading content...