Struct rust_3d::PointCloud2D
[−]
[src]
pub struct PointCloud2D<P> where
P: Is2D, { pub data: Vec<P>, }
PointCloud2D, a collection of positions within 2D space
Fields
data: Vec<P>
Methods
impl<P> PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
pub fn new() -> PointCloud2D<P>
[src]
Creates a new, empty point cloud
pub fn with_capacity(n: usize) -> PointCloud2D<P>
[src]
Creates a new, empty point cloud with capacity
pub fn to_str(&self) -> String
[src]
Serializes the point cloud
pub fn for_each_point<F>(&mut self, f: F) where
F: FnMut(&mut P),
[src]
F: FnMut(&mut P),
Applies a function to each position
impl<P> PointCloud2D<P> where
P: IsBuildable2D + Clone,
[src]
P: IsBuildable2D + Clone,
pub fn parse(text: String) -> Result<PointCloud2D<P>>
[src]
Creates a new point cloud from an input string
pub fn append_ra<RA>(&mut self, ra: &RA) where
RA: IsRandomAccessible<P>,
[src]
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>
[src]
Returns the "default value" for a type. Read more
impl<P: Debug> Debug for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<P: PartialEq> PartialEq for PointCloud2D<P> where
P: Is2D,
[src]
P: Is2D,
fn eq(&self, __arg_0: &PointCloud2D<P>) -> bool
[src]
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
[src]
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>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &PointCloud2D<P>) -> bool
[src]
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
[src]
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
[src]
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
[src]
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
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
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>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
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)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
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
[src]
Performs 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
[src]
Performs 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)
[src]
Should push an element to the end of collection
fn insert(&mut self, index: usize, point: P) -> Result<()>
[src]
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>
[src]
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>
[src]
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<()>
[src]
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<Self>
[src]
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
[src]
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<()>
[src]
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)
[src]
Should sort all elements by x
fn sort_y(&mut self)
[src]
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)
[src]
Should merge other into this
fn combine(&self, other: &Self) -> Self
[src]
Should return a combination of this and other
impl<P> Display for PointCloud2D<P> where
P: Is2D + Display,
[src]
P: Is2D + Display,
Auto Trait Implementations
impl<P> Send for PointCloud2D<P> where
P: Send,
P: Send,
impl<P> Sync for PointCloud2D<P> where
P: Sync,
P: Sync,