sources
Class Poly2D
java.lang.Object
sources.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 |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Poly2D
public Poly2D(double[] xkoord,
double[] ykoord)
- Creates new Poly2D
- Parameters:
xkoord
- the x coordinatesykoord
- th y coordinates
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()