Class ASite
java.lang.Object
com.treemap.swing.fastvoronoi.originalconvexhull.Vertex
com.treemap.swing.fastvoronoi.originalconvexhull.ASite
- All Implemented Interfaces:
iSite,Comparable<Site>
- Direct Known Subclasses:
Site
A site is a 2 dimensional point which has a weight.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final doubleprotected doubleprotected PolygonSimpleprotected doubleFields inherited from class com.treemap.swing.fastvoronoi.originalconvexhull.Vertex
originalObject, x, y, z -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThe sites are first ordered according to the x-axis and then according to the y axisdoubleEucliddoubledistanceCircles(Site point) doublegetPoint()doublevoidsetNeighbours(ArrayList<Site> list) voidsetPercentage(double percentage) voidsetPolygon(PolygonSimple poly) voidsetWeight(double weight) voidsetX(double x) voidsetXY(double x, double y) voidsetXYW(double x, double y, double weight) voidsetY(double y) toString()
-
Field Details
-
nearlyZero
protected static final double nearlyZero- See Also:
-
weight
protected double weight -
percentage
protected double percentage -
polygon
-
nonClippedPolyon
-
neighbours
-
-
Constructor Details
-
ASite
public ASite(double x, double y) - Parameters:
x- x-coordinatey- y-coordinate
-
ASite
public ASite(double x, double y, double weight) - Parameters:
x- x-coordinatey- y-coordinateweight- the weight of the site, where weight=radius*radius which is used for weighting
-
ASite
public ASite(double x, double y, double weight, double percentage)
-
-
Method Details
-
getPolygon
- Specified by:
getPolygonin interfaceiSite
-
toString
-
setPolygon
- Specified by:
setPolygonin interfaceiSite
-
setNeighbours
- Specified by:
setNeighboursin interfaceiSite
-
getNeighbours
- Specified by:
getNeighboursin interfaceiSite
-
getWeight
public double getWeight() -
setWeight
public void setWeight(double weight) -
setXY
public void setXY(double x, double y) -
setXYW
public void setXYW(double x, double y, double weight) -
setX
public void setX(double x) -
setY
public void setY(double y) -
compareTo
The sites are first ordered according to the x-axis and then according to the y axis- Specified by:
compareToin interfaceComparable<Site>
-
setPercentage
public void setPercentage(double percentage) - Specified by:
setPercentagein interfaceiSite
-
getPercentage
public double getPercentage()- Specified by:
getPercentagein interfaceiSite
-
getPoint
-
distance
Euclid- Parameters:
point-- Returns:
-
distanceCircles
-