pub struct MultiPolygon<T> {
pub polygons: Vec<Polygon<T>>,
}Expand description
A MultiPolygon is a list of polygons. There is no restrictions on the polygons (they can be
intersecting, empty, etc.).
Fields§
§polygons: Vec<Polygon<T>>The list of polygons which defines the content of this multi polygon.
Implementations§
Source§impl<T> MultiPolygon<T>
impl<T> MultiPolygon<T>
Sourcepub fn from_polygons(polygons: Vec<Polygon<T>>) -> Self
pub fn from_polygons(polygons: Vec<Polygon<T>>) -> Self
Create a MultiPolygon from a vector of Polygons.
Source§impl<T: Copy> MultiPolygon<T>
impl<T: Copy> MultiPolygon<T>
Sourcepub fn all_edges_iter(&self) -> impl Iterator<Item = Edge<T>> + '_
pub fn all_edges_iter(&self) -> impl Iterator<Item = Edge<T>> + '_
Iterate over all edges of the polygons including holes.
Trait Implementations§
Source§impl<T: Clone> Clone for MultiPolygon<T>
impl<T: Clone> Clone for MultiPolygon<T>
Source§fn clone(&self) -> MultiPolygon<T>
fn clone(&self) -> MultiPolygon<T>
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<T: Debug> Debug for MultiPolygon<T>
impl<T: Debug> Debug for MultiPolygon<T>
Source§impl<T: Default> Default for MultiPolygon<T>
impl<T: Default> Default for MultiPolygon<T>
Source§fn default() -> MultiPolygon<T>
fn default() -> MultiPolygon<T>
Returns the “default value” for a type. Read more
Source§impl<T, IP: Into<Polygon<T>>> FromIterator<IP> for MultiPolygon<T>
impl<T, IP: Into<Polygon<T>>> FromIterator<IP> for MultiPolygon<T>
Source§fn from_iter<I: IntoIterator<Item = IP>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = IP>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl<T: Hash> Hash for MultiPolygon<T>
impl<T: Hash> Hash for MultiPolygon<T>
Source§impl<T> IntoIterator for MultiPolygon<T>
impl<T> IntoIterator for MultiPolygon<T>
Source§impl<T> MapPointwise<T> for MultiPolygon<T>where
T: CoordinateType,
impl<T> MapPointwise<T> for MultiPolygon<T>where
T: CoordinateType,
Source§impl<T: CoordinateType> TryBoundingBox<T> for MultiPolygon<T>
impl<T: CoordinateType> TryBoundingBox<T> for MultiPolygon<T>
Source§fn try_bounding_box(&self) -> Option<Rect<T>>
fn try_bounding_box(&self) -> Option<Rect<T>>
Return the bounding box of this geometry if a bounding box is defined.
Source§impl<T> WindingNumber<T> for MultiPolygon<T>where
T: CoordinateType,
impl<T> WindingNumber<T> for MultiPolygon<T>where
T: CoordinateType,
Source§fn winding_number(&self, point: Point<T>) -> isize
fn winding_number(&self, point: Point<T>) -> isize
Calculate the winding number of the polygon around this point. Read more
Auto Trait Implementations§
impl<T> Freeze for MultiPolygon<T>
impl<T> RefUnwindSafe for MultiPolygon<T>where
T: RefUnwindSafe,
impl<T> Send for MultiPolygon<T>where
T: Send,
impl<T> Sync for MultiPolygon<T>where
T: Sync,
impl<T> Unpin for MultiPolygon<T>where
T: Unpin,
impl<T> UnwindSafe for MultiPolygon<T>where
T: 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 moreSource§impl<S, T> RotateOrtho<T> for S
impl<S, T> RotateOrtho<T> for S
Source§fn rotate_ortho(&self, a: Angle) -> S
fn rotate_ortho(&self, a: Angle) -> S
Rotate the geometrical shape by a multiple of 90 degrees.