Trait pasture_core::containers::InterleavedPointBufferExt[][src]

pub trait InterleavedPointBufferExt {
    fn get_point_ref<T: PointType>(&self, point_index: usize) -> &T;
fn get_points_ref<T: PointType>(&self, range: Range<usize>) -> &[T];
fn iter_point_ref<T: PointType>(&self) -> PointIteratorByRef<'_, T>

Notable traits for PointIteratorByRef<'a, T>

impl<'a, T: PointType + 'a> Iterator for PointIteratorByRef<'a, T> type Item = &'a T;
; }

Extension trait that provides generic methods for accessing point data in an InterleavedPointBuffer

Required methods

fn get_point_ref<T: PointType>(&self, point_index: usize) -> &T[src]

Returns a reference to the point at point_index from the associated InterleavedPointBuffer, strongly typed to the PointType T

Panics

Panics if point_index is >= self.len()

fn get_points_ref<T: PointType>(&self, range: Range<usize>) -> &[T][src]

Returns a reference to the given range of points from the associated InterleavedPointBuffer, strongly typed to the PointType T

Panics

Panics if the start of range is greater than the end of range, or if the end of range is greater than self.len()

fn iter_point_ref<T: PointType>(&self) -> PointIteratorByRef<'_, T>

Notable traits for PointIteratorByRef<'a, T>

impl<'a, T: PointType + 'a> Iterator for PointIteratorByRef<'a, T> type Item = &'a T;
[src]

Returns an iterator over references to all points within the associated InterleavedPointBuffer, strongly typed to the PointType T

Panics

Panics if the associated InterleavedPointBuffer does not store points with type T

Loading content...

Implementors

impl<B: InterleavedPointBuffer + ?Sized> InterleavedPointBufferExt for B[src]

Loading content...