pub struct Polygon<T> {
pub vertices: Vec<Point<T>>,
}Expand description
A polygon in the plain.
Fields§
§vertices: Vec<Point<T>>The ordered list of vertices describing the polygon.
Trait Implementations§
Source§impl<T> Geometry for Polygon<T>
impl<T> Geometry for Polygon<T>
Source§fn from_raw(
_: Operands<'_, Self>,
vertices: Vec<Self::Vertex>,
_: &Tolerance<T>,
) -> Option<Self>
fn from_raw( _: Operands<'_, Self>, vertices: Vec<Self::Vertex>, _: &Tolerance<T>, ) -> Option<Self>
Tries to construct a geometry from the given raw data.
Source§fn total_vertices(&self) -> usize
fn total_vertices(&self) -> usize
Returns the total amount of vertices in the geometry.
Source§impl<T> IntoIterator for Polygon<T>
impl<T> IntoIterator for Polygon<T>
Source§impl<T> RightHanded for Polygon<T>
impl<T> RightHanded for Polygon<T>
Source§fn is_clockwise(&self) -> bool
fn is_clockwise(&self) -> bool
Returns true if, and only if, this geometry is oriented clockwise.
Auto Trait Implementations§
impl<T> Freeze for Polygon<T>
impl<T> RefUnwindSafe for Polygon<T>
impl<T> Send for Polygon<T>
impl<T> Sync for Polygon<T>
impl<T> Unpin for Polygon<T>
impl<T> UnsafeUnpin for Polygon<T>
impl<T> UnwindSafe for Polygon<T>
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