math.geom2d.polygon
Class Polygon2DUtils

Package class diagram package Polygon2DUtils
java.lang.Object
  extended by math.geom2d.polygon.Polygon2DUtils

public abstract class Polygon2DUtils
extends Object

Author:
dlegland

Constructor Summary
Polygon2DUtils()
           
 
Method Summary
static Domain2D createBuffer(Polygon2D polygon, double d)
           
static Polygon2D union(Polygon2D polygon1, Polygon2D polygon2)
           
static int windingNumber(Collection<Point2D> vertices, Point2D point)
          Computes the winding number of the polygon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Polygon2DUtils

public Polygon2DUtils()
Method Detail

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 polygon
point - 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.