Class PolygonFunction
- java.lang.Object
-
- science.aist.imaging.core.pointprocessing.PolygonFunction
-
- All Implemented Interfaces:
Function<JavaPoint2D,JavaPolygon2D>
- Direct Known Subclasses:
StarPolygonFunction
public class PolygonFunction extends Object implements Function<JavaPoint2D,JavaPolygon2D>
Class for creating a symmetrical polygon
- Since:
- 1.0
- Author:
- Christoph Praschl
-
-
Field Summary
Fields Modifier and Type Field Description protected intnumOfPointsNumber of points of the polygonprotected intoffsetRotational offset of the points along the radiusprotected intradiusRadius of the polygon
-
Constructor Summary
Constructors Constructor Description PolygonFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JavaPolygon2Dapply(JavaPoint2D center)Create a polygon for a given center point, a radius and the number of polygon points.
-
-
-
Method Detail
-
apply
public JavaPolygon2D apply(JavaPoint2D center)
Create a polygon for a given center point, a radius and the number of polygon points.- Specified by:
applyin interfaceFunction<JavaPoint2D,JavaPolygon2D>- Parameters:
center- Center of the polygon- Returns:
- Polygon
-
-