Class Polygon2DDouble
java.lang.Object
de.xima.fc.common.geometry.Polygon2DDouble
A 2-dimensional polygon defined by a list of points.
- Since:
- 8.4.0
-
Constructor Summary
ConstructorsConstructorDescriptionPolygon2DDouble(Point2DDouble[] points) Creates a polygon from the given points.Polygon2DDouble(Iterable<Point2DDouble> points) Creates a polygon from the given points. -
Method Summary
-
Constructor Details
-
Polygon2DDouble
Creates a polygon from the given points.- Parameters:
points- The points that define this polygon.
-
Polygon2DDouble
Creates a polygon from the given points.- Parameters:
points- The points that define this polygon.
-
-
Method Details
-
boundingBox
Gets the bounding box of this polygon, i.e. the smallest rectangle that contains all points of the polygon.- Returns:
- The bounding box of this polygon.
-
points
Gets the list of points that define this polygon.- Returns:
- The points that define this polygon.
-
translate
Translates this polygon by the given delta values.- Parameters:
deltaX- The amount to translate in the x direction.deltaY- The amount to translate in the y direction.- Returns:
- A new polygon that is translated by the given delta values.
-