pub struct ScanCloud {
pub points: Vec<[f32; 3]>,
pub normals: Option<Vec<[f32; 3]>>,
}Expand description
A point cloud produced by a body scanner.
Points are in metres, Y-up convention.
Fields§
§points: Vec<[f32; 3]>3-D positions [x, y, z] in metres.
normals: Option<Vec<[f32; 3]>>Optional per-point outward normals.
Implementations§
Source§impl ScanCloud
impl ScanCloud
Sourcepub fn new(points: Vec<[f32; 3]>) -> Self
pub fn new(points: Vec<[f32; 3]>) -> Self
Create a cloud from positions only (normals set to None).
Sourcepub fn point_count(&self) -> usize
pub fn point_count(&self) -> usize
Number of points in the cloud.
Sourcepub fn bbox(&self) -> ([f32; 3], [f32; 3])
pub fn bbox(&self) -> ([f32; 3], [f32; 3])
Compute the axis-aligned bounding box as (min, max).
Returns ([0.0; 3], [0.0; 3]) for an empty cloud.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScanCloud
impl RefUnwindSafe for ScanCloud
impl Send for ScanCloud
impl Sync for ScanCloud
impl Unpin for ScanCloud
impl UnsafeUnpin for ScanCloud
impl UnwindSafe for ScanCloud
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