pub struct PointCloud {
pub positions: Positions,
pub colors: Option<Vec<Srgba>>,
}Expand description
Represents a set of points in 3D space, usually created with a scanner.
Fields§
§positions: PositionsThe positions of the points.
colors: Option<Vec<Srgba>>The colors of the points.
Implementations§
Source§impl PointCloud
impl PointCloud
Sourcepub fn cube() -> PointCloud
pub fn cube() -> PointCloud
Returns a point cloud whose points lie on the corners of an axis aligned unconnected cube with positions in the range [-1..1] in all axes.
Sourcepub fn compute_aabb(&self) -> AxisAlignedBoundingBox
pub fn compute_aabb(&self) -> AxisAlignedBoundingBox
Computes the AxisAlignedBoundingBox for this point cloud.
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 moreSource§impl Debug for PointCloud
impl Debug for PointCloud
Source§impl Default for PointCloud
impl Default for PointCloud
Source§fn default() -> PointCloud
fn default() -> PointCloud
Returns the “default value” for a type. Read more
Source§impl Deserialize for PointCloud
impl Deserialize for PointCloud
Source§fn deserialize(
path: impl AsRef<Path>,
raw_assets: &mut RawAssets,
) -> Result<PointCloud, Error>
fn deserialize( path: impl AsRef<Path>, raw_assets: &mut RawAssets, ) -> Result<PointCloud, Error>
Source§impl From<PointCloud> for Instances
impl From<PointCloud> for Instances
Source§fn from(points: PointCloud) -> Self
fn from(points: PointCloud) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PointCloud
impl RefUnwindSafe for PointCloud
impl Send for PointCloud
impl Sync for PointCloud
impl Unpin 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