Struct iron_shapes::multi_polygon::MultiPolygon
source · 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 copy 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<'de, T> Deserialize<'de> for MultiPolygon<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for MultiPolygon<T>where T: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. 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> Serialize for MultiPolygon<T>where
T: Serialize,
impl<T> Serialize for MultiPolygon<T>where T: Serialize,
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> 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<S, T> RotateOrtho<T> for Swhere
T: Copy + Zero + Sub<T, Output = T>,
S: MapPointwise<T>,
impl<S, T> RotateOrtho<T> for Swhere T: Copy + Zero + Sub<T, Output = T>, S: MapPointwise<T>,
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.