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:
java.lang.Cloneable
- Enclosing class:
- ContourPlot
public class ContourPlot.PointeredPoint2D extends java.awt.geom.Point2D
The PointeredPoint2D class is an implementation of thePoint2D
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
-
-
Constructor Summary
Constructors Constructor Description PointeredPoint2D()
Creates 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
double
getX()
double
getY()
void
setLocation(double x, double y)
java.lang.String
toString()
-
-
-
Constructor Detail
-
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 Detail
-
getX
public double getX()
- Specified by:
getX
in classjava.awt.geom.Point2D
-
getY
public double getY()
- Specified by:
getY
in classjava.awt.geom.Point2D
-
setLocation
public void setLocation(double x, double y)
- Specified by:
setLocation
in classjava.awt.geom.Point2D
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classjava.awt.geom.Point2D
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-