org.osm2world.core.math
public class PolygonXYZ extends Object
Constructor and Description |
---|
PolygonXYZ(List<VectorXYZ> vertexLoop) |
Modifier and Type | Method and Description |
---|---|
TriangleXYZ |
asTriangleXYZ()
returns a triangle with the same vertices as this polygon.
|
List<LineSegmentXYZ> |
getSegments() |
SimplePolygonXZ |
getSimpleXZPolygon()
caller must check whether flattening will result in a simple planar polygon
|
List<VectorXYZ> |
getVertexLoop()
returns the polygon's vertices.
|
List<VectorXYZ> |
getVertices()
returns the polygon's vertices.
|
PolygonXZ |
getXZPolygon() |
PolygonXYZ |
reverse()
returns a reversed version of this polygon.
|
int |
size()
returns the number of vertices in this polygon.
|
public PolygonXYZ(List<VectorXYZ> vertexLoop)
vertexLoop
- vertices defining the polygon;
first and last vertex must be equalpublic List<VectorXYZ> getVertices()
getVertexLoop()
, there is no duplication
of the first/last vertex.public List<VectorXYZ> getVertexLoop()
public int size()
getVertices()
.size().public List<LineSegmentXYZ> getSegments()
public PolygonXZ getXZPolygon()
public SimplePolygonXZ getSimpleXZPolygon()
public TriangleXYZ asTriangleXYZ()
public PolygonXYZ reverse()