Class StarPolygonFunction
- java.lang.Object
-
- science.aist.imaging.core.pointprocessing.PolygonFunction
-
- science.aist.imaging.core.pointprocessing.StarPolygonFunction
-
- All Implemented Interfaces:
Function<JavaPoint2D,JavaPolygon2D>
public class StarPolygonFunction extends PolygonFunction
Class for creating a star-shaped polygon
- Since:
- 1.0
- Author:
- Christoph Praschl
-
-
Field Summary
-
Fields inherited from class science.aist.imaging.core.pointprocessing.PolygonFunction
numOfPoints, offset, radius
-
-
Constructor Summary
Constructors Constructor Description StarPolygonFunction(int radius, int numOfPoints, int offset, double innerRadius)
Constructor for creating a polygon function for star shaped polygons
-
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.
-
-
-
Constructor Detail
-
StarPolygonFunction
public StarPolygonFunction(int radius, int numOfPoints, int offset, double innerRadius)
Constructor for creating a polygon function for star shaped polygons- Parameters:
radius
- Radius of the polygonnumOfPoints
- Number of points of the polygonoffset
- Rotational offset of the points along the radiusinnerRadius
- Factor ]0, 1[ for calculating the inner radius of the stars
-
-
Method Detail
-
apply
public JavaPolygon2D apply(JavaPoint2D center)
Description copied from class:PolygonFunction
Create a polygon for a given center point, a radius and the number of polygon points.- Specified by:
apply
in interfaceFunction<JavaPoint2D,JavaPolygon2D>
- Overrides:
apply
in classPolygonFunction
- Parameters:
center
- Center of the polygon- Returns:
- Polygon
-
-