|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfaa.tg.units.Coordinate
public class Coordinate
A class representing a Coordinate Pair or Point using Distances for the Axis Measure.See the source: Coordinate.java
| Field Summary | |
|---|---|
static java.lang.String |
CVS_VERSION_ID
The CVS Version ID |
(package private) static long |
serialVersionUID
|
(package private) Distance |
xCoordinate
|
(package private) Distance |
yCoordinate
|
| Constructor Summary | |
|---|---|
Coordinate(Distance xCoordinate,
Distance yCoordinate)
Constructor for Coordinate. |
|
| Method Summary | |
|---|---|
Coordinate |
add(Coordinate theCoordinate)
Returns the sum of the coordinates. |
java.lang.Object |
clone()
Clone a Coordinate |
Distance |
getXCoordinate()
Returns the value of this Coordinate as a Distance. |
double |
getXCoordinate(DistanceUnits distanceUnits)
Returns the value of this Coordinate as a double. |
Distance |
getYCoordinate()
Returns the value of this Coordinate as a Distance. |
double |
getYCoordinate(DistanceUnits distanceUnits)
Returns the value of this Coordinate as a double. |
Coordinate |
mul(double aMultplier)
|
Coordinate |
rotate(Angle angle)
Rotates the coordinate (point pair) by given angle in the counterclockwise direction about (0,0). |
Coordinate |
rotateAll(Angle angle)
|
Coordinate |
sub(Coordinate theCoordinate)
Returns the difference of the coordinates. |
java.awt.geom.Point2D |
toPoint2D(DistanceUnits units)
|
java.lang.String |
toString()
Return the String representation of this object StringBuilder is used for efficiency. |
Coordinate |
translate(Coordinate offsets)
Translates this Coordinate using the offsets given by the argument. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static final long serialVersionUID
public static final java.lang.String CVS_VERSION_ID
Distance xCoordinate
Distance yCoordinate
| Constructor Detail |
|---|
public Coordinate(Distance xCoordinate,
Distance yCoordinate)
xCoordinate - yCoordinate - | Method Detail |
|---|
public Distance getXCoordinate()
public double getXCoordinate(DistanceUnits distanceUnits)
distanceUnits -
public Distance getYCoordinate()
public double getYCoordinate(DistanceUnits distanceUnits)
distanceUnits -
public Coordinate add(Coordinate theCoordinate)
Returns the sum of the coordinates.
(xn,xy) = (x1,y1) + (x2,y2) = (x1 + x2, y1 + y2)
theCoordinate -
public Coordinate rotate(Angle angle)
angle, - the Angle to rotate by.
public Coordinate rotateAll(Angle angle)
public Coordinate translate(Coordinate offsets)
other, - the Coordinate consisting of the offsets to translate b
public Coordinate sub(Coordinate theCoordinate)
Returns the difference of the coordinates.
(xn,xy) = (x1,y1) - (x2,y2) = (x1 - x2, y1 - y2)
theCoordinate - is the (x2,y2) coordinate
public java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic Coordinate mul(double aMultplier)
public java.awt.geom.Point2D toPoint2D(DistanceUnits units)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||