Trait pasture_core::containers::PerAttributePointBuffer [−][src]
Trait for PointBuffer
types that store point data in PerAttribute memory layout. In buffers of this type, the data for a single
attribute of all points in stored together in memory. To illustrate this, suppose the PointLayout
of some point
type defines the default attributes POSITION_3D
(Vector3<f64>
), INTENSITY
(u16
) and CLASSIFICATION
(u8
). In
a PerAttributePointBuffer
, the data layout is like this:
[Vector3<f64>, Vector3<f64>, Vector3<f64>, ...]
[u16, u16, u16, ...]
[u8, u8, u8, ...]
Required methods
fn get_raw_attribute_ref(
&self,
point_index: usize,
attribute: &PointAttributeDefinition
) -> &[u8]
[src]
&self,
point_index: usize,
attribute: &PointAttributeDefinition
) -> &[u8]
Returns a pointer to the raw memory for the attribute entry of the given point in this PointBuffer. In contrast to get_raw_attribute, this function performs no copy operations and thus can yield better performance. Panics if point_index is out of bounds or if the attribute is not part of the point_layout of this PointBuffer.
fn get_raw_attribute_range_ref(
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition
) -> &[u8]
[src]
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition
) -> &[u8]
Returns a pointer to the raw memory for the given attribute of a range of points in this PointBuffer. In contrast to get_raw_attribute_range, this function performs no copy operations and thus can yield better performance. Panics if any index in index_range is out of bounds or if the attribute is not part of the point_layout of this PointBuffer.
fn slice(&self, range: Range<usize>) -> PerAttributePointBufferSlice<'_>
[src]
Returns a read-only slice of the associated PerAttributePointBuffer
Implementors
impl PerAttributePointBuffer for PerAttributeVecPointStorage
[src]
fn get_raw_attribute_ref(
&self,
point_index: usize,
attribute: &PointAttributeDefinition
) -> &[u8]
[src]
&self,
point_index: usize,
attribute: &PointAttributeDefinition
) -> &[u8]
fn get_raw_attribute_range_ref(
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition
) -> &[u8]
[src]
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition
) -> &[u8]
fn slice(&self, range: Range<usize>) -> PerAttributePointBufferSlice<'_>
[src]
impl<'d> PerAttributePointBuffer for PerAttributePointView<'d>
[src]
fn get_raw_attribute_ref(
&self,
point_index: usize,
attribute: &PointAttributeDefinition
) -> &[u8]
[src]
&self,
point_index: usize,
attribute: &PointAttributeDefinition
) -> &[u8]
fn get_raw_attribute_range_ref(
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition
) -> &[u8]
[src]
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition
) -> &[u8]
fn slice(&self, range: Range<usize>) -> PerAttributePointBufferSlice<'_>
[src]
impl<'p> PerAttributePointBuffer for PerAttributePointBufferSlice<'p>
[src]
fn get_raw_attribute_ref(
&self,
point_index: usize,
attribute: &PointAttributeDefinition
) -> &[u8]
[src]
&self,
point_index: usize,
attribute: &PointAttributeDefinition
) -> &[u8]
fn get_raw_attribute_range_ref(
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition
) -> &[u8]
[src]
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition
) -> &[u8]
fn slice(&self, range: Range<usize>) -> PerAttributePointBufferSlice<'_>
[src]
impl<'p> PerAttributePointBuffer for PerAttributePointBufferSliceMut<'p>
[src]
fn get_raw_attribute_ref(
&self,
point_index: usize,
attribute: &PointAttributeDefinition
) -> &[u8]
[src]
&self,
point_index: usize,
attribute: &PointAttributeDefinition
) -> &[u8]
fn get_raw_attribute_range_ref(
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition
) -> &[u8]
[src]
&self,
index_range: Range<usize>,
attribute: &PointAttributeDefinition
) -> &[u8]