public final class Polygon extends Object
| Modifier and Type | Method and Description |
|---|---|
Polygon |
flip()
Flips this polygon.
|
static Polygon |
fromPolygons(List<Coords3d> vertices,
Color color)
Creates a new polygon that consists of the specified vertices.
|
protected List<Coords3d> |
getVertices() |
void |
splitPolygon(Polygon polygon,
List<Polygon> coplanarFront,
List<Polygon> coplanarBack,
List<Polygon> front,
List<Polygon> back)
Splits a
Polygon by this plane if needed. |
List<Facet> |
toFacets()
Converts this polygon to triangles.
|
Polygon |
transformed(ITransformation transform)
Returns a transformed copy of this polygon.
|
public static Polygon fromPolygons(List<Coords3d> vertices, Color color)
vertices - polygon verticescolor - the color of the polygonpublic Polygon flip()
public List<Facet> toFacets()
public Polygon transformed(ITransformation transform)
transform - the transformation to applypublic void splitPolygon(Polygon polygon, List<Polygon> coplanarFront, List<Polygon> coplanarBack, List<Polygon> front, List<Polygon> back)
Polygon by this plane if needed. After that it puts the
polygons or the polygon fragments in the appropriate lists
(front, back). Coplanar polygons go into either
coplanarFront, coplanarBack depending on their
orientation with respect to this plane. Polygons in front or back of this
plane go into either front or back.polygon - polygon to splitcoplanarFront - "coplanar front" polygonscoplanarBack - "coplanar back" polygonsfront - front polygonsback - back polgonsCopyright © 2014–2020, Printing in 3D. All rights reserved.