pub trait InterleavedBufferMut<'a>: InterleavedBuffer<'a> + BorrowedMutBuffer<'a> {
    // Required methods
    fn get_point_mut<'b>(&'b mut self, index: usize) -> &'b mut [u8] 
       where 'a: 'b;
    fn get_point_range_mut<'b>(
        &'b mut self,
        range: Range<usize>
    ) -> &'b mut [u8] 
       where 'a: 'b;

    // Provided method
    fn view_raw_attribute_mut<'b>(
        &'b mut self,
        attribute: &PointAttributeMember
    ) -> RawAttributeViewMut<'b>
       where 'a: 'b { ... }
}
Expand description

Trait for buffers that store point data in interleaved memory layout and also borrow their memory mutably. Compared to InterleavedBuffer, this allows accessing point data by mutable reference!

Required Methods§

source

fn get_point_mut<'b>(&'b mut self, index: usize) -> &'b mut [u8]
where 'a: 'b,

Get a mutable slice of the point memory of the point at index. This is the mutable version of InterleavedBuffer::get_point_ref

Panics

Should panic if index is out of bounds

source

fn get_point_range_mut<'b>(&'b mut self, range: Range<usize>) -> &'b mut [u8]
where 'a: 'b,

Get a mutable slice of the memory for the given range of points. This is the mutable version of InterleavedBuffer::get_point_range_ref

Panics

Should panic if index is out of bounds

Provided Methods§

source

fn view_raw_attribute_mut<'b>( &'b mut self, attribute: &PointAttributeMember ) -> RawAttributeViewMut<'b>
where 'a: 'b,

Like view_raw_attribute, but returns mutable byte slices of the attribute data

Implementors§