geoComplex
Class GeoCellTools

java.lang.Object
  extended bygeoComplex.GeoCellTools

public final class GeoCellTools
extends java.lang.Object

Author:
karsten

Constructor Summary
GeoCellTools()
           
 
Method Summary
static boolean contains(GeoCell cell, Point p)
           
private static Point[] getEndpoints(GeoCell cell)
           
static IntegerMap makeBoundary(GeoComplex complex, java.util.Collection boundary)
          Ting
private  java.awt.Shape makePolygon(java.util.Collection corners)
          Constructs a polygon from a collection of Point2D objects.
private  java.util.Collection sortPolyCorners(java.util.Collection edges)
          Sorts the endpoints of a collection of Line2D-objects, so that these points describe the contiuous, closed path defined by the lines.
private static java.awt.geom.QuadCurve2D toCurve(Point P1, Point P2, Vector T1, Vector T2)
           
private static java.awt.geom.Point2D toPoint2D(Point p)
          \Ting
static java.awt.Shape toShape(GeoCell cell, java.awt.geom.AffineTransform transform)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoCellTools

public GeoCellTools()
Method Detail

makeBoundary

public static IntegerMap makeBoundary(GeoComplex complex,
                                      java.util.Collection boundary)
Ting


toPoint2D

private static java.awt.geom.Point2D toPoint2D(Point p)
\Ting


getEndpoints

private static Point[] getEndpoints(GeoCell cell)

toCurve

private static java.awt.geom.QuadCurve2D toCurve(Point P1,
                                                 Point P2,
                                                 Vector T1,
                                                 Vector T2)

toShape

public static java.awt.Shape toShape(GeoCell cell,
                                     java.awt.geom.AffineTransform transform)

contains

public static boolean contains(GeoCell cell,
                               Point p)

makePolygon

private java.awt.Shape makePolygon(java.util.Collection corners)
Constructs a polygon from a collection of Point2D objects.

Parameters:
corners - the corners of the polygon
Returns:
the polygon as a shape

sortPolyCorners

private java.util.Collection sortPolyCorners(java.util.Collection edges)
Sorts the endpoints of a collection of Line2D-objects, so that these points describe the contiuous, closed path defined by the lines. The collection of lines will be destroyed!

Parameters:
edges - a collection of Line2D-objects
Returns:
a collection of Point2D-objects, describing the polygon defined by the edges