Package gov.nih.mipav.model.algorithms
Class ContourPlot.PointeredPoint2D
java.lang.Object
java.awt.geom.Point2D
gov.nih.mipav.model.algorithms.ContourPlot.PointeredPoint2D
- All Implemented Interfaces:
Cloneable
- Enclosing class:
ContourPlot
The PointeredPoint2D class is an implementation of the
Point2D
class that uses two double arrays of size 1 to store its x and y coordinate.
This allows for referencing the x or y coordinate elsewhere
(kind of as a pointer to the value) e.g. in another PointeredPoint2D
so that 2 points can share a coordinate, for example points on the same axis.- Author:
- hageldave
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.geom.Point2D
Point2D.Double, Point2D.Float -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates point at (0,0)PointeredPoint2D(double[] xptr, double[] yptr) Creates point using the specified arrays as pointers for this point's coordinatesPointeredPoint2D(double x, double y) Creates point at (x,y) -
Method Summary
Methods inherited from class java.awt.geom.Point2D
distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation
-
Field Details
-
x
public final double[] x'pointer' to x coordinate -
y
public final double[] y'pointer' to y coordinate
-
-
Constructor Details
-
PointeredPoint2D
public PointeredPoint2D()Creates point at (0,0) -
PointeredPoint2D
public PointeredPoint2D(double x, double y) Creates point at (x,y)- Parameters:
x- coordinatey- coordinate
-
PointeredPoint2D
public PointeredPoint2D(double[] xptr, double[] yptr) Creates point using the specified arrays as pointers for this point's coordinates- Parameters:
xptr- array to use as pointer to x coordinateyptr- array to use as pointer to y coordinate
-
-
Method Details
-
getX
public double getX() -
getY
public double getY() -
setLocation
public void setLocation(double x, double y) - Specified by:
setLocationin classPoint2D
-
clone
-
toString
-