public class SimplePlanarPolygon3D extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Plane3D |
plane |
protected SimplePolygon2D |
polygonIn2d |
protected List<Point3D> |
vertices |
| Constructor and Description |
|---|
SimplePlanarPolygon3D(Collection<Point3D> vertices)
Construct planar polygon in 3D from vertices
|
| Modifier and Type | Method and Description |
|---|---|
double |
getArea()
Get area of the polygon
|
Point3D |
getCentroid()
Get centroid
|
double |
getDistance(Point3D from)
Get distance to a point
|
Plane3D |
getPlane()
Get plane of the polygon
All polygon vertices are guaranteed to lie within the plane,
but the specific origin, vector1, vector2 and coordinate subsystem derived from those
are chosen arbitrarily.
|
SimplePolygon2D |
getPolygonIn2d()
Get 2D projection of the polygon
Vertex coordinates are determined by the coordinate subsystem of the plane of the polygon.
|
List<Point3D> |
getVertices()
Get vertices
Read only.
|
Point3D |
project(Point3D point)
Project point
|
String |
toString() |
protected transient SimplePolygon2D polygonIn2d
protected transient Plane3D plane
public SimplePlanarPolygon3D(Collection<Point3D> vertices)
vertices - polygons vertices, must form a planar polygonpublic Plane3D getPlane()
All polygon vertices are guaranteed to lie within the plane, but the specific origin, vector1, vector2 and coordinate subsystem derived from those are chosen arbitrarily.
public SimplePolygon2D getPolygonIn2d()
getPlane().public Point3D getCentroid()
public double getArea()
public Point3D project(Point3D point)
point - point to projectpublic double getDistance(Point3D from)
Copyright © 2018 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All rights reserved.