Struct rust_3d::point_cloud_2d::PointCloud2D
[−]
[src]
pub struct PointCloud2D<P> where
P: Is2D, { pub data: Vec<Box<P>>, }
PointCloud2D, a collection of positions within 2D space
Fields
data: Vec<Box<P>>
Methods
impl<P> PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
fn new() -> PointCloud2D<P>
Creates a new, empty point cloud
fn with_capacity(n: usize) -> PointCloud2D<P>
Creates a new, empty point cloud with capacity
fn to_str(&self) -> String
Serializes the point cloud
fn for_each_point<F>(&mut self, f: F) where
F: FnMut(&mut P),
F: FnMut(&mut P),
Applies a function to each position
impl<P> PointCloud2D<P> where
P: IsBuildable2D + Clone,
[src]
P: IsBuildable2D + Clone,
fn parse(text: String) -> Result<PointCloud2D<P>>
Creates a new point cloud from an input string
fn append_ra<RA>(&mut self, ra: &RA) where
RA: IsRandomAccessible<P>,
RA: IsRandomAccessible<P>,
Appends all elements of an IsRandomAccessible
Trait Implementations
impl<P: Default> Default for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
fn default() -> PointCloud2D<P>
Returns the "default value" for a type. Read more
impl<P> Clone for PointCloud2D<P> where
P: Is2D + Clone,
[src]
P: Is2D + Clone,
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<P> Index<usize> for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
type Output = P
The returned type after indexing
fn index(&self, i: usize) -> &P
The method for the indexing (container[index]
) operation
impl<P> IndexMut<usize> for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
fn index_mut(&mut self, i: usize) -> &mut P
The method for the mutable indexing (container[index]
) operation
impl<P> IsRandomAccessible<P> for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
impl<P> IsRandomInsertible<P> for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
fn push(&mut self, point: P)
Should push an element to the end of collection
fn insert(&mut self, index: usize, point: P) -> Result<()>
Should insert an element at the given index
impl<P> IsMovable2D for PointCloud2D<P> where
P: Is2D + IsMovable2D,
[src]
P: Is2D + IsMovable2D,
impl<P> HasBoundingBox2D for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
fn bounding_box(&self) -> Result<BoundingBox2D>
Should return the bounding box as a pair of two points. The first point should be the minimum for all coordinates, the second the maximum for all coordinates
impl<P> HasCenterOfGravity2D for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
fn center_of_gravity(&self) -> Result<Point2D>
Should return the center of gravity
impl<P> HasLength for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
impl<P> IsViewBuildable for PointCloud2D<P> where
P: Is2D + Clone,
[src]
P: Is2D + Clone,
fn apply_view(&mut self, view: &View) -> Result<()>
Should apply the view and only keep items indexed within the view. Should return an error if any index is out of bounds
fn from_view(&self, view: &View) -> Result<Box<Self>>
Should create a new object consisting only of items indexed within the view. Should return an error if any index is out of bounds
impl<P> IsSortableND for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
fn n_dimensions() -> usize
Should return the number of dimensions. E.g. 2 for 2D space, 3 for 3D space etc.
fn sort_dim(&mut self, dimension: usize) -> Result<()>
Should sort all elements by the given dimension
impl<P> IsSortable2D for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
fn sort_x(&mut self)
Should sort all elements by x
fn sort_y(&mut self)
Should sort all elements by y
impl<P> IsMergeable for PointCloud2D<P> where
P: Is2D + Clone,
[src]
P: Is2D + Clone,
fn consume(&mut self, other: Self)
Should merge other into this
fn combine(&self, other: &Self) -> Self
Should return a combination of this and other
impl<P> Display for PointCloud2D<P> where
P: Is2D + Display,
[src]
P: Is2D + Display,