Struct nannou::geom::polygon::Polygon [−][src]
pub struct Polygon<I> { pub points: I, }
Expand description
A simple type wrapper around a list of points that describe a polygon.
Fields
points: I
The iterator yielding all points in the polygon.
Implementations
Construct a new polygon from the given list of points describing its vertices.
Triangulate the polygon given as a list of Point
s describing its sides.
Returns None
if the polygon’s iterator yields less than two points.
Returns Some
with the touched triangle if the given Point
is over the polygon described
by the given series of points.
This uses the triangles
function internally.
The Rect
that bounds the polygon.
Returns None
if the polygon’s point iterator is empty.
Trait Implementations
Auto Trait Implementations
impl<I> RefUnwindSafe for Polygon<I> where
I: RefUnwindSafe,
impl<I> UnwindSafe for Polygon<I> where
I: UnwindSafe,
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
Mutably borrows from an owned value. Read more
Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
Convert into T, returning ok if the color is inside of its defined range,
otherwise an OutOfBounds
error is returned which contains the unclamped color. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V