Struct rust_3d::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: Debug> Debug for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
impl<P: PartialEq> PartialEq for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
fn eq(&self, __arg_0: &PointCloud2D<P>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &PointCloud2D<P>) -> bool
This method tests for !=
.
impl<P: PartialOrd> PartialOrd for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
fn partial_cmp(&self, __arg_0: &PointCloud2D<P>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &PointCloud2D<P>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &PointCloud2D<P>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &PointCloud2D<P>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &PointCloud2D<P>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<P: Ord> Ord for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
fn cmp(&self, __arg_0: &PointCloud2D<P>) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
ord_max_min
)Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
ord_max_min
)Compares and returns the minimum of two values. Read more
impl<P: Eq> Eq for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
impl<P: Clone> Clone for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
fn clone(&self) -> PointCloud2D<P>
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: Hash> Hash for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
fn hash<__HP: Hasher>(&self, __arg_0: &mut __HP)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. 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,