Struct libreda_db::layout::prelude::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>, Global>
The list of polygons which defines the content of this multi polygon.
Implementations
sourceimpl<T> MultiPolygon<T>
impl<T> MultiPolygon<T>
sourcepub fn new() -> MultiPolygon<T>
pub fn new() -> MultiPolygon<T>
Create an empty set of polygons.
sourcepub fn from_polygons(polygons: Vec<Polygon<T>, Global>) -> MultiPolygon<T>
pub fn from_polygons(polygons: Vec<Polygon<T>, Global>) -> MultiPolygon<T>
Create a MultiPolygon
from a vector of Polygon
s.
sourceimpl<T> MultiPolygon<T> where
T: Copy,
impl<T> MultiPolygon<T> where
T: Copy,
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
sourceimpl BooleanOp<Ratio<i32>> for MultiPolygon<Ratio<i32>>
impl BooleanOp<Ratio<i32>> for MultiPolygon<Ratio<i32>>
sourcefn boolean_op(
&self,
operation: Operation,
other: &MultiPolygon<Ratio<i32>>,
polygon_semantics: PolygonSemantics
) -> MultiPolygon<Ratio<i32>>
fn boolean_op(
&self,
operation: Operation,
other: &MultiPolygon<Ratio<i32>>,
polygon_semantics: PolygonSemantics
) -> MultiPolygon<Ratio<i32>>
Compute the boolean operation of self
and other
. Read more
sourcefn intersection(&self, other: &Self) -> MultiPolygon<T>
fn intersection(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean intersection self & other
. Read more
sourcefn difference(&self, other: &Self) -> MultiPolygon<T>
fn difference(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean difference self - other
. Read more
sourcefn union(&self, other: &Self) -> MultiPolygon<T>
fn union(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean union self | other
. Read more
sourcefn xor(&self, other: &Self) -> MultiPolygon<T>
fn xor(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean exclusive OR self ^ other
. Read more
sourceimpl BooleanOp<Ratio<i64>> for MultiPolygon<Ratio<i64>>
impl BooleanOp<Ratio<i64>> for MultiPolygon<Ratio<i64>>
sourcefn boolean_op(
&self,
operation: Operation,
other: &MultiPolygon<Ratio<i64>>,
polygon_semantics: PolygonSemantics
) -> MultiPolygon<Ratio<i64>>
fn boolean_op(
&self,
operation: Operation,
other: &MultiPolygon<Ratio<i64>>,
polygon_semantics: PolygonSemantics
) -> MultiPolygon<Ratio<i64>>
Compute the boolean operation of self
and other
. Read more
sourcefn intersection(&self, other: &Self) -> MultiPolygon<T>
fn intersection(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean intersection self & other
. Read more
sourcefn difference(&self, other: &Self) -> MultiPolygon<T>
fn difference(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean difference self - other
. Read more
sourcefn union(&self, other: &Self) -> MultiPolygon<T>
fn union(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean union self | other
. Read more
sourcefn xor(&self, other: &Self) -> MultiPolygon<T>
fn xor(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean exclusive OR self ^ other
. Read more
sourceimpl BooleanOp<f32> for MultiPolygon<f32>
impl BooleanOp<f32> for MultiPolygon<f32>
sourcefn boolean_op(
&self,
operation: Operation,
other: &MultiPolygon<f32>,
polygon_semantics: PolygonSemantics
) -> MultiPolygon<f32>
fn boolean_op(
&self,
operation: Operation,
other: &MultiPolygon<f32>,
polygon_semantics: PolygonSemantics
) -> MultiPolygon<f32>
Compute the boolean operation of self
and other
. Read more
sourcefn intersection(&self, other: &Self) -> MultiPolygon<T>
fn intersection(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean intersection self & other
. Read more
sourcefn difference(&self, other: &Self) -> MultiPolygon<T>
fn difference(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean difference self - other
. Read more
sourcefn union(&self, other: &Self) -> MultiPolygon<T>
fn union(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean union self | other
. Read more
sourcefn xor(&self, other: &Self) -> MultiPolygon<T>
fn xor(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean exclusive OR self ^ other
. Read more
sourceimpl BooleanOp<f64> for MultiPolygon<f64>
impl BooleanOp<f64> for MultiPolygon<f64>
sourcefn boolean_op(
&self,
operation: Operation,
other: &MultiPolygon<f64>,
polygon_semantics: PolygonSemantics
) -> MultiPolygon<f64>
fn boolean_op(
&self,
operation: Operation,
other: &MultiPolygon<f64>,
polygon_semantics: PolygonSemantics
) -> MultiPolygon<f64>
Compute the boolean operation of self
and other
. Read more
sourcefn intersection(&self, other: &Self) -> MultiPolygon<T>
fn intersection(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean intersection self & other
. Read more
sourcefn difference(&self, other: &Self) -> MultiPolygon<T>
fn difference(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean difference self - other
. Read more
sourcefn union(&self, other: &Self) -> MultiPolygon<T>
fn union(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean union self | other
. Read more
sourcefn xor(&self, other: &Self) -> MultiPolygon<T>
fn xor(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean exclusive OR self ^ other
. Read more
sourceimpl BooleanOp<i32> for MultiPolygon<i32>
impl BooleanOp<i32> for MultiPolygon<i32>
sourcefn boolean_op(
&self,
operation: Operation,
other: &MultiPolygon<i32>,
polygon_semantics: PolygonSemantics
) -> MultiPolygon<i32>
fn boolean_op(
&self,
operation: Operation,
other: &MultiPolygon<i32>,
polygon_semantics: PolygonSemantics
) -> MultiPolygon<i32>
Compute the boolean operation of self
and other
. Read more
sourcefn intersection(&self, other: &Self) -> MultiPolygon<T>
fn intersection(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean intersection self & other
. Read more
sourcefn difference(&self, other: &Self) -> MultiPolygon<T>
fn difference(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean difference self - other
. Read more
sourcefn union(&self, other: &Self) -> MultiPolygon<T>
fn union(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean union self | other
. Read more
sourcefn xor(&self, other: &Self) -> MultiPolygon<T>
fn xor(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean exclusive OR self ^ other
. Read more
sourceimpl BooleanOp<i64> for MultiPolygon<i64>
impl BooleanOp<i64> for MultiPolygon<i64>
sourcefn boolean_op(
&self,
operation: Operation,
other: &MultiPolygon<i64>,
polygon_semantics: PolygonSemantics
) -> MultiPolygon<i64>
fn boolean_op(
&self,
operation: Operation,
other: &MultiPolygon<i64>,
polygon_semantics: PolygonSemantics
) -> MultiPolygon<i64>
Compute the boolean operation of self
and other
. Read more
sourcefn intersection(&self, other: &Self) -> MultiPolygon<T>
fn intersection(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean intersection self & other
. Read more
sourcefn difference(&self, other: &Self) -> MultiPolygon<T>
fn difference(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean difference self - other
. Read more
sourcefn union(&self, other: &Self) -> MultiPolygon<T>
fn union(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean union self | other
. Read more
sourcefn xor(&self, other: &Self) -> MultiPolygon<T>
fn xor(&self, other: &Self) -> MultiPolygon<T>
Compute the boolean exclusive OR self ^ other
. Read more
sourceimpl<T> Clone for MultiPolygon<T> where
T: Clone,
impl<T> Clone for MultiPolygon<T> where
T: Clone,
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 for MultiPolygon<T> where
T: Debug,
impl<T> Debug for MultiPolygon<T> where
T: Debug,
sourceimpl<T> Default for MultiPolygon<T> where
T: Default,
impl<T> Default for MultiPolygon<T> where
T: Default,
sourcefn default() -> MultiPolygon<T>
fn default() -> MultiPolygon<T>
Returns the “default value” for a type. Read more
sourceimpl<'de, T> Deserialize<'de> for MultiPolygon<T> where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for MultiPolygon<T> where
T: Deserialize<'de>,
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<MultiPolygon<T>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<MultiPolygon<T>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<T, IP> From<IP> for MultiPolygon<T> where
IP: Into<Polygon<T>>,
impl<T, IP> From<IP> for MultiPolygon<T> where
IP: Into<Polygon<T>>,
sourcefn from(x: IP) -> MultiPolygon<T>
fn from(x: IP) -> MultiPolygon<T>
Converts to this type from the input type.
sourceimpl<T, IP> FromIterator<IP> for MultiPolygon<T> where
IP: Into<Polygon<T>>,
impl<T, IP> FromIterator<IP> for MultiPolygon<T> where
IP: Into<Polygon<T>>,
sourcefn from_iter<I>(iter: I) -> MultiPolygon<T> where
I: IntoIterator<Item = IP>,
fn from_iter<I>(iter: I) -> MultiPolygon<T> where
I: IntoIterator<Item = IP>,
Creates a value from an iterator. Read more
sourceimpl<T> Hash for MultiPolygon<T> where
T: Hash,
impl<T> Hash for MultiPolygon<T> where
T: Hash,
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> Serialize for MultiPolygon<T> where
T: Serialize,
impl<T> Serialize for MultiPolygon<T> where
T: Serialize,
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
sourceimpl<T> TryBoundingBox<T> for MultiPolygon<T> where
T: CoordinateType,
impl<T> TryBoundingBox<T> for MultiPolygon<T> where
T: CoordinateType,
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.