Struct poly2tri::Polygon [] [src]

pub struct Polygon { /* fields omitted */ }

Basic polygon interface


impl Polygon

This struct implements a polygon. Note that this is currently a wrapper around a c library and as such it's bubbles through some of the underlying implementation details such as panicking on duplicated points.

Creates a new empty polygon.

Creates a polygon from an iterator of points.

Adds a single point to the polygon. These points must not be repeated!

Looks up a point at a certain index.

Returns the size of the polygon (number of points).

Trait Implementations

impl Drop for Polygon

A method called when the value goes out of scope. Read more