pub struct Polygon {
pub vertices: Vec<Point>,
}Expand description
A polygon represented by an ordered sequence of boundary vertices.
Vertices must occur consecutively around the polygon boundary, either clockwise or counter-clockwise. The final edge back to the first vertex is implicit, so the first vertex should not be repeated at the end.
A polygon can be concave or self-intersecting, but some algorithms may return degenerate boundaries for those inputs. This type represents one boundary only; it cannot represent holes or multiple disconnected polygons.
Fields§
§vertices: Vec<Point>Vertices of the polygon.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Polygon
Auto Trait Implementations§
impl Freeze for Polygon
impl RefUnwindSafe for Polygon
impl Send for Polygon
impl Sync for Polygon
impl Unpin for Polygon
impl UnsafeUnpin for Polygon
impl UnwindSafe for Polygon
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