edu.stanford.rsl.konrad.geometry.splines.capi
Class CAPIPoint2D
java.lang.Object
edu.stanford.rsl.konrad.geometry.shapes.simple.PointND
edu.stanford.rsl.konrad.geometry.splines.capi.CAPIPoint
edu.stanford.rsl.konrad.geometry.splines.capi.CAPIPoint2D
- All Implemented Interfaces:
- com.graphbuilder.curve.CurvePoint, com.graphbuilder.geom.Point2d, Transformable, java.io.Serializable
public class CAPIPoint2D
- extends CAPIPoint
- implements com.graphbuilder.geom.Point2d
A class to model a 2D point. Compatible with java.awt and com.graphbuilder
- Author:
- akmaier
- See Also:
- Serialized Form
Method Summary |
double |
distance(CAPIPoint2D two)
computes the Euclidean distance between the current point the the point "two" as
$|| \\mathbf{x_1} - \\mathbf{x_2} || = \\sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2}$. |
double |
getX()
|
double |
getY()
|
void |
setLocation(double[] p)
|
void |
setLocation(double x,
double y)
|
Methods inherited from class edu.stanford.rsl.konrad.geometry.shapes.simple.PointND |
applyTransform, clone, equals, euclideanDistance, get, getAbstractVector, getCoordinates, getDimension, set, setCoordinates, toString, updateIfHigher, updateIfLower |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
CAPIPoint2D
public CAPIPoint2D(double x,
double y)
getX
public double getX()
- Specified by:
getX
in interface com.graphbuilder.geom.Point2d
getY
public double getY()
- Specified by:
getY
in interface com.graphbuilder.geom.Point2d
setLocation
public void setLocation(double x,
double y)
- Specified by:
setLocation
in interface com.graphbuilder.geom.Point2d
distance
public double distance(CAPIPoint2D two)
- computes the Euclidean distance between the current point
the the point "two"
as

- Parameters:
two
- the other point
- Returns:
- the distance
setLocation
public void setLocation(double[] p)
- Specified by:
setLocation
in interface com.graphbuilder.curve.CurvePoint
- Overrides:
setLocation
in class CAPIPoint