Trait pasture_core::containers::PointBuffer [−][src]
Base trait for all containers that store point data. A PointBuffer stores any number of point entries with a layout defined by the PointBuffers associated PointLayout structure.
Users will rarely have to work with this base trait directly as it exposes the underlying memory-unsafe API for fast point and attribute access. Instead, prefer specific PointBuffer implementations or point views!
Required methods
fn get_raw_point(&self, point_index: usize, buf: &mut [u8])
[src]
Get the data for a single point from this PointBuffer and store it inside the given memory region. Panics if point_index is out of bounds. buf must be at least as big as a single point entry in the corresponding PointLayout of this PointBuffer
fn get_raw_attribute(
&self,
point_index: usize,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
[src]
&self,
point_index: usize,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
Get the data for the given attribute of a single point from this PointBuffer and store it inside the given memory region. Panics if point_index is out of bounds or if the attribute is not part of the point_layout of this PointBuffer. buf must be at least as big as a single attribute entry of the given attribute.
fn get_raw_points(&self, index_range: Range<usize>, buf: &mut [u8])
[src]
Get the data for a range of points from this PointBuffer and stores it inside the given memory region. Panics if any index in index_range is out of bounds. buf must be at least as big as the size of a single point entry in the corresponding PointLayout of this PointBuffer multiplied by the number of point indices in index_range
fn get_raw_attribute_range(
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
[src]
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
fn len(&self) -> usize
[src]
Returns the number of unique point entries stored inside this PointBuffer
fn point_layout(&self) -> &PointLayout
[src]
Returns a reference to the underlying PointLayout of this PointBuffer
Provided methods
fn is_empty(&self) -> bool
[src]
Returns true if the associated PointBuffer
is empty, i.e. it stores zero points
fn as_interleaved(&self) -> Option<&dyn InterleavedPointBuffer>
[src]
Try to downcast the associated PointBuffer
into an InterleavedPointBuffer
fn as_per_attribute(&self) -> Option<&dyn PerAttributePointBuffer>
[src]
Try to downcast the associated PointBuffer
into an PerAttributePointBuffer
Implementors
impl PointBuffer for InterleavedVecPointStorage
[src]
fn get_raw_point(&self, point_index: usize, buf: &mut [u8])
[src]
fn get_raw_attribute(
&self,
point_index: usize,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
[src]
&self,
point_index: usize,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
fn get_raw_points(&self, point_indices: Range<usize>, buf: &mut [u8])
[src]
fn get_raw_attribute_range(
&self,
point_indices: Range<usize>,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
[src]
&self,
point_indices: Range<usize>,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
fn len(&self) -> usize
[src]
fn point_layout(&self) -> &PointLayout
[src]
fn as_interleaved(&self) -> Option<&dyn InterleavedPointBuffer>
[src]
impl PointBuffer for PerAttributeVecPointStorage
[src]
fn get_raw_point(&self, point_index: usize, buf: &mut [u8])
[src]
fn get_raw_attribute(
&self,
point_index: usize,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
[src]
&self,
point_index: usize,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
fn get_raw_points(&self, point_indices: Range<usize>, buf: &mut [u8])
[src]
fn get_raw_attribute_range(
&self,
point_indices: Range<usize>,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
[src]
&self,
point_indices: Range<usize>,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
fn len(&self) -> usize
[src]
fn point_layout(&self) -> &PointLayout
[src]
fn as_per_attribute(&self) -> Option<&dyn PerAttributePointBuffer>
[src]
impl<'d> PointBuffer for InterleavedPointView<'d>
[src]
fn get_raw_point(&self, point_index: usize, buf: &mut [u8])
[src]
fn get_raw_attribute(
&self,
point_index: usize,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
[src]
&self,
point_index: usize,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
fn get_raw_points(&self, index_range: Range<usize>, buf: &mut [u8])
[src]
fn get_raw_attribute_range(
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
[src]
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
fn len(&self) -> usize
[src]
fn point_layout(&self) -> &PointLayout
[src]
fn as_interleaved(&self) -> Option<&dyn InterleavedPointBuffer>
[src]
impl<'d> PointBuffer for PerAttributePointView<'d>
[src]
fn get_raw_point(&self, point_index: usize, buf: &mut [u8])
[src]
fn get_raw_attribute(
&self,
point_index: usize,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
[src]
&self,
point_index: usize,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
fn get_raw_points(&self, index_range: Range<usize>, buf: &mut [u8])
[src]
fn get_raw_attribute_range(
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
[src]
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
fn len(&self) -> usize
[src]
fn point_layout(&self) -> &PointLayout
[src]
fn as_per_attribute(&self) -> Option<&dyn PerAttributePointBuffer>
[src]
impl<'p> PointBuffer for InterleavedPointBufferSlice<'p>
[src]
fn get_raw_point(&self, point_index: usize, buf: &mut [u8])
[src]
fn get_raw_attribute(
&self,
point_index: usize,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
[src]
&self,
point_index: usize,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
fn get_raw_points(&self, index_range: Range<usize>, buf: &mut [u8])
[src]
fn get_raw_attribute_range(
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
[src]
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
fn len(&self) -> usize
[src]
fn point_layout(&self) -> &PointLayout
[src]
fn as_interleaved(&self) -> Option<&dyn InterleavedPointBuffer>
[src]
impl<'p> PointBuffer for PerAttributePointBufferSlice<'p>
[src]
fn get_raw_point(&self, point_index: usize, buf: &mut [u8])
[src]
fn get_raw_attribute(
&self,
point_index: usize,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
[src]
&self,
point_index: usize,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
fn get_raw_points(&self, index_range: Range<usize>, buf: &mut [u8])
[src]
fn get_raw_attribute_range(
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
[src]
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
fn len(&self) -> usize
[src]
fn point_layout(&self) -> &PointLayout
[src]
fn as_per_attribute(&self) -> Option<&dyn PerAttributePointBuffer>
[src]
impl<'p> PointBuffer for PerAttributePointBufferSliceMut<'p>
[src]
fn get_raw_point(&self, point_index: usize, buf: &mut [u8])
[src]
fn get_raw_attribute(
&self,
point_index: usize,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
[src]
&self,
point_index: usize,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
fn get_raw_points(&self, index_range: Range<usize>, buf: &mut [u8])
[src]
fn get_raw_attribute_range(
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)
[src]
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition,
buf: &mut [u8]
)