pub struct PointCloud {
pub positions: Vec<[f64; 3]>,
pub normals: Option<Vec<[f64; 3]>>,
pub colors: Option<Vec<[u8; 3]>>,
pub intensities: Option<Vec<f64>>,
pub classifications: Option<Vec<u8>>,
}Expand description
A point cloud: a collection of points with optional per-point attributes.
Fields§
§positions: Vec<[f64; 3]>Positions of all points.
normals: Option<Vec<[f64; 3]>>Per-point normals (if present, same length as positions).
colors: Option<Vec<[u8; 3]>>Per-point RGB colors (if present).
intensities: Option<Vec<f64>>Per-point intensity values (if present).
classifications: Option<Vec<u8>>Per-point classification labels (if present).
Implementations§
Source§impl PointCloud
impl PointCloud
Sourcepub fn from_positions(positions: Vec<[f64; 3]>) -> Self
pub fn from_positions(positions: Vec<[f64; 3]>) -> Self
Create a point cloud from positions only.
Sourcepub fn has_normals(&self) -> bool
pub fn has_normals(&self) -> bool
Whether normals are present.
Sourcepub fn has_colors(&self) -> bool
pub fn has_colors(&self) -> bool
Whether colors are present.
Sourcepub fn has_intensities(&self) -> bool
pub fn has_intensities(&self) -> bool
Whether intensities are present.
Sourcepub fn add_full_point(&mut self, point: PointCloudPoint)
pub fn add_full_point(&mut self, point: PointCloudPoint)
Add a point with all attributes.
Sourcepub fn get_point(&self, idx: usize) -> Option<PointCloudPoint>
pub fn get_point(&self, idx: usize) -> Option<PointCloudPoint>
Get a single point as a PointCloudPoint.
Trait Implementations§
Source§impl Clone for PointCloud
impl Clone for PointCloud
Source§fn clone(&self) -> PointCloud
fn clone(&self) -> PointCloud
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PointCloud
impl Debug for PointCloud
Auto Trait Implementations§
impl Freeze for PointCloud
impl RefUnwindSafe for PointCloud
impl Send for PointCloud
impl Sync for PointCloud
impl Unpin for PointCloud
impl UnsafeUnpin for PointCloud
impl UnwindSafe for PointCloud
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.