Class ASite
java.lang.Object
com.treemap.swing.originalfastvoronoi.convexHull.JVertex
com.treemap.swing.originalfastvoronoi.j2d.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 double
protected double
protected PolygonSimple
Preflow Extrapolationprotected double
Fields inherited from class com.treemap.swing.originalfastvoronoi.convexHull.JVertex
originalObject, x, y, z
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
The sites are first ordered according to the x-axis and then according to the y axisdouble
Eucliddouble
distanceCircles
(Site point) double
getPoint()
double
void
paint
(Graphics2D g) void
setNeighbours
(ArrayList<Site> list) void
setPercentage
(double percentage) void
setPolygon
(PolygonSimple poly) void
setWeight
(double weight) void
setX
(double x) void
setXY
(double x, double y) void
setXYW
(double x, double y, double weight) void
setY
(double y) toString()
-
Field Details
-
nearlyZero
protected static final double nearlyZero- See Also:
-
weight
protected double weight -
percentage
protected double percentage -
polygon
-
nonClippedPolyon
-
neighbours
-
cellObject
-
preflowVector
Preflow Extrapolation
-
-
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:
getPolygon
in interfaceiSite
-
toString
-
setPolygon
- Specified by:
setPolygon
in interfaceiSite
-
setNeighbours
- Specified by:
setNeighbours
in interfaceiSite
-
getNeighbours
- Specified by:
getNeighbours
in 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:
compareTo
in interfaceComparable<Site>
-
paint
-
setPercentage
public void setPercentage(double percentage) - Specified by:
setPercentage
in interfaceiSite
-
getPercentage
public double getPercentage()- Specified by:
getPercentage
in interfaceiSite
-
getPoint
-
distance
Euclid- Parameters:
point
-- Returns:
-
distanceCircles
-