Struct nannou::geom::polygon::Polygon [] [src]

pub struct Polygon<I> {
    pub points: I,
}

A simple type wrapper around a list of points that describe a polygon.

Fields

The iterator yielding all points in the polygon.

Methods

impl<I> Polygon<I> where
    I: Iterator
[src]

[src]

Construct a new polygon from the given list of points describing its vertices.

[src]

Triangulate the polygon given as a list of Points describing its sides.

Returns None if the polygon's iterator yields less than two points.

[src]

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.

[src]

The Rect that bounds the polygon.

Returns None if the polygon's point iterator is empty.

[src]

The `Cuboid that bounds the polygon.

Returns None if the polygon's point iterator is empty.

Trait Implementations

impl<I: Clone> Clone for Polygon<I>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<I: Debug> Debug for Polygon<I>
[src]

[src]

Formats the value using the given formatter. Read more

impl<I: PartialEq> PartialEq for Polygon<I>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<I: Eq> Eq for Polygon<I>
[src]

Auto Trait Implementations

impl<I> Send for Polygon<I> where
    I: Send

impl<I> Sync for Polygon<I> where
    I: Sync