pub struct Polygon2D<P>where
P: Is2D,{ /* private fields */ }
Expand description
Polygon2D, a polygon within 2D space
Trait Implementations§
Source§impl<P> From<PointCloud2D<P>> for Polygon2D<P>where
P: Is2D,
impl<P> From<PointCloud2D<P>> for Polygon2D<P>where
P: Is2D,
Source§fn from(pc: PointCloud2D<P>) -> Self
fn from(pc: PointCloud2D<P>) -> Self
Converts to this type from the input type.
Source§impl<P> HasBoundingBox2DMaybe for Polygon2D<P>where
P: Is2D,
impl<P> HasBoundingBox2DMaybe for Polygon2D<P>where
P: Is2D,
Source§fn bounding_box_maybe(&self) -> Result<BoundingBox2D>
fn bounding_box_maybe(&self) -> Result<BoundingBox2D>
Should return the bounding box if it can be calculated
Source§impl<P> HasCenterOfGravity2D for Polygon2D<P>where
P: Is2D,
impl<P> HasCenterOfGravity2D for Polygon2D<P>where
P: Is2D,
Source§fn center_of_gravity(&self) -> Result<Point2D>
fn center_of_gravity(&self) -> Result<Point2D>
Should return the center of gravity
Source§impl<P> IsEditablePolygon<P> for Polygon2D<P>
impl<P> IsEditablePolygon<P> for Polygon2D<P>
Source§fn add_vertex(&mut self, vertex: P) -> VId
fn add_vertex(&mut self, vertex: P) -> VId
Should add a vertex to the end and return its id
Source§impl<P> IsMatrix3Transformable for Polygon2D<P>
impl<P> IsMatrix3Transformable for Polygon2D<P>
Source§impl<P> IsMovable2D for Polygon2D<P>where
P: Is2D + IsMovable2D,
impl<P> IsMovable2D for Polygon2D<P>where
P: Is2D + IsMovable2D,
Source§impl<P> IsPolygon<P> for Polygon2D<P>
impl<P> IsPolygon<P> for Polygon2D<P>
Source§fn num_segments(&self) -> usize
fn num_segments(&self) -> usize
Should return the number of segments within the polygon
Source§fn segment_vertex_ids(&self, segmentid: SId) -> Result<(VId, VId)>
fn segment_vertex_ids(&self, segmentid: SId) -> Result<(VId, VId)>
Should return the ids of vertices of the given segment
Source§fn segment_vertices(&self, segmentid: SId) -> Result<(P, P)>
fn segment_vertices(&self, segmentid: SId) -> Result<(P, P)>
Should return the vertices of the given segment
Source§fn num_vertices(&self) -> usize
fn num_vertices(&self) -> usize
Returns the number of vertices within the polygon
Source§impl<P> IsScalable for Polygon2D<P>where
P: IsEditable2D,
impl<P> IsScalable for Polygon2D<P>where
P: IsEditable2D,
Source§impl<P> Ord for Polygon2D<P>
impl<P> Ord for Polygon2D<P>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<P> PartialOrd for Polygon2D<P>where
P: Is2D + PartialOrd,
impl<P> PartialOrd for Polygon2D<P>where
P: Is2D + PartialOrd,
impl<P> Eq for Polygon2D<P>
impl<P> StructuralPartialEq for Polygon2D<P>where
P: Is2D,
Auto Trait Implementations§
impl<P> Freeze for Polygon2D<P>
impl<P> RefUnwindSafe for Polygon2D<P>where
P: RefUnwindSafe,
impl<P> Send for Polygon2D<P>where
P: Send,
impl<P> Sync for Polygon2D<P>where
P: Sync,
impl<P> Unpin for Polygon2D<P>where
P: Unpin,
impl<P> UnwindSafe for Polygon2D<P>where
P: UnwindSafe,
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