sources
Class Poly2D

java.lang.Object
  extended bysources.Poly2D

public class Poly2D
extends java.lang.Object

Class for Representation of an Polygon in 2D


Constructor Summary
Poly2D(double[] xkoord, double[] ykoord)
          Creates new Poly2D
 
Method Summary
 java.lang.Object clone()
           
 boolean contains(double x, double y)
           
 Poly2D createNPoly(int n)
           
 Poly2D enlargeBy(double c)
           
 double getArea()
           
 int getLength()
           
 double[] getXKoord()
           
 double[] getYKoord()
           
 void insertLineSegment(Poly2D line, boolean rdir, int st2, int olen2)
           
 void insertPoint(double x, double y, int st)
           
 boolean isNeighbor(Poly2D pol)
           
 int nearest(double x, double y)
           
 void savePoly(java.lang.String filename)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Poly2D

public Poly2D(double[] xkoord,
              double[] ykoord)
Creates new Poly2D

Parameters:
xkoord - the x coordinates
ykoord - th y coordinates
Method Detail

getXKoord

public double[] getXKoord()

getYKoord

public double[] getYKoord()

getLength

public int getLength()

createNPoly

public Poly2D createNPoly(int n)

getArea

public double getArea()

enlargeBy

public Poly2D enlargeBy(double c)

isNeighbor

public boolean isNeighbor(Poly2D pol)

contains

public boolean contains(double x,
                        double y)

insertPoint

public void insertPoint(double x,
                        double y,
                        int st)

insertLineSegment

public void insertLineSegment(Poly2D line,
                              boolean rdir,
                              int st2,
                              int olen2)

savePoly

public void savePoly(java.lang.String filename)

nearest

public int nearest(double x,
                   double y)

clone

public java.lang.Object clone()