math.geom2d.polygon
Class Polygon2DUtils
java.lang.Object
math.geom2d.polygon.Polygon2DUtils
public abstract class Polygon2DUtils
- extends Object
- Author:
- dlegland
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Polygon2DUtils
public Polygon2DUtils()
windingNumber
public static final int windingNumber(Collection<Point2D> vertices,
Point2D point)
- Computes the winding number of the polygon. Algorithm adapted from
http://www.geometryalgorithms.com/Archive/algorithm_0103/algorithm_0103.htm
- Parameters:
vertices
- the vertices of the polygonpoint
- the reference point
- Returns:
- the number of windings of the curve around the point
createBuffer
public static final Domain2D createBuffer(Polygon2D polygon,
double d)
union
public static final Polygon2D union(Polygon2D polygon1,
Polygon2D polygon2)
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.