Module voronator::polygon [−][src]
Expand description
Provides functions for handling polygons.
Polygons are stored as a Vec
Example
extern crate voronator;
use voronator::delaunator::Point;
use voronator::polygon::Polygon;
fn main() {
let points = vec![Point{x: 0., y: 0.}, Point{x: 1., y: 0.}, Point{x: 1., y: 1.}, Point{x: 0., y: 1.}];
let polygon = Polygon::from_points(points);
}
Structs
Represents a polygon.
Functions
Sutherland-Hodgman clipping modified from https://rosettacode.org/wiki/Sutherland-Hodgman_polygon_clipping#C.2B.2B