pub struct PointCloud {
pub points: Vec<[f64; 3]>,
pub normals: Option<Vec<[f64; 3]>>,
pub colors: Option<Vec<[f64; 3]>>,
}Expand description
Point cloud from 3D scan (PLY/OBJ import), using f64 precision.
Fields§
§points: Vec<[f64; 3]>3-D positions [x, y, z].
normals: Option<Vec<[f64; 3]>>Optional per-point normals.
colors: Option<Vec<[f64; 3]>>Optional per-point RGB colours in [0, 1].
Implementations§
Source§impl PointCloud
impl PointCloud
Sourcepub fn from_ply_ascii(data: &str) -> Result<Self>
pub fn from_ply_ascii(data: &str) -> Result<Self>
Parse PLY ASCII format.
Sourcepub fn from_ply_binary_le(data: &[u8]) -> Result<Self>
pub fn from_ply_binary_le(data: &[u8]) -> Result<Self>
Parse PLY binary little-endian format.
Sourcepub fn from_obj_vertices(data: &str) -> Result<Self>
pub fn from_obj_vertices(data: &str) -> Result<Self>
Parse OBJ vertex data (vertices only, ignore faces).
Sourcepub fn voxel_downsample(&self, voxel_size: f64) -> Self
pub fn voxel_downsample(&self, voxel_size: f64) -> Self
Downsample by voxel grid.
Sourcepub fn remove_outliers(&self, k_neighbors: usize, std_ratio: f64) -> Self
pub fn remove_outliers(&self, k_neighbors: usize, std_ratio: f64) -> Self
Remove statistical outliers.
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more