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 int
numOfPoints
Number of points of the polygonprotected int
offset
Rotational offset of the points along the radiusprotected int
radius
Radius of the polygon
-
Constructor Summary
Constructors Constructor Description PolygonFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JavaPolygon2D
apply(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:
apply
in interfaceFunction<JavaPoint2D,JavaPolygon2D>
- Parameters:
center
- Center of the polygon- Returns:
- Polygon
-
-