Struct iron_shapes::multi_polygon::MultiPolygon
source · [−]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
sourceimpl<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 Polygon
s.
Trait Implementations
sourceimpl<T: Clone> Clone for MultiPolygon<T>
impl<T: Clone> Clone for MultiPolygon<T>
sourcefn clone(&self) -> MultiPolygon<T>
fn clone(&self) -> MultiPolygon<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<T: Debug> Debug for MultiPolygon<T>
impl<T: Debug> Debug for MultiPolygon<T>
sourceimpl<T: Default> Default for MultiPolygon<T>
impl<T: Default> Default for MultiPolygon<T>
sourcefn default() -> MultiPolygon<T>
fn default() -> MultiPolygon<T>
Returns the “default value” for a type. Read more
sourceimpl<T, IP: Into<Polygon<T>>> From<IP> for MultiPolygon<T>
impl<T, IP: Into<Polygon<T>>> From<IP> for MultiPolygon<T>
sourceimpl<T, IP: Into<Polygon<T>>> FromIterator<IP> for MultiPolygon<T>
impl<T, IP: Into<Polygon<T>>> FromIterator<IP> for MultiPolygon<T>
sourcefn 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
sourceimpl<T: Hash> Hash for MultiPolygon<T>
impl<T: Hash> Hash for MultiPolygon<T>
sourceimpl<T> IntoIterator for MultiPolygon<T>
impl<T> IntoIterator for MultiPolygon<T>
sourceimpl<T> MapPointwise<T> for MultiPolygon<T> where
T: CoordinateType,
impl<T> MapPointwise<T> for MultiPolygon<T> where
T: CoordinateType,
sourceimpl<T: CoordinateType> TryBoundingBox<T> for MultiPolygon<T>
impl<T: CoordinateType> TryBoundingBox<T> for MultiPolygon<T>
sourcefn 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.
sourceimpl<T> WindingNumber<T> for MultiPolygon<T> where
T: CoordinateType,
impl<T> WindingNumber<T> for MultiPolygon<T> where
T: CoordinateType,
sourcefn 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
sourcefn contains_point_non_oriented(&self, point: Point<T>) -> bool
fn contains_point_non_oriented(&self, point: Point<T>) -> bool
Check if point
is inside the polygon, i.e. the polygons winds around the point
a non-zero number of times. Read more
sourcefn contains_point(&self, point: Point<T>) -> bool
fn contains_point(&self, point: Point<T>) -> bool
Check if point
is inside the polygon, i.e. the polygon winds around the point
an odd number of times. 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<S, T> RotateOrtho<T> for S where
T: Copy + Zero + Sub<T, Output = T>,
S: MapPointwise<T>,
impl<S, T> RotateOrtho<T> for S where
T: Copy + Zero + Sub<T, Output = T>,
S: MapPointwise<T>,
sourcefn rotate_ortho(&self, a: Angle) -> S
fn rotate_ortho(&self, a: Angle) -> S
Rotate the geometrical shape by a multiple of 90 degrees.