Polygon

This class is used to define the contour of an Extrusion. The contour is defined in the X-Y plane as a polygon.

The polygon can be concave like the one above.

Creating the Polygon contour

Constructors
Polygon(PVector[] verts, int dir, boolean open)
Parameter Comments
verts
an array of PVectors that defines the polygon's vertices. They can form an open or closed shape.
dir
the order used to specify the vertices either S3D.CW (clockwise) or S3D.CCW (counter-clockwise)
open
true if the vertices form an open contour i.e. the first and last vertices have different XY coordinates.