|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgeometry.Coordinates2D
geometry.Coordinates3D
public class Coordinates3D
data structure to hold 3D coordinates, extending the 2D coordinates strucure
by a valid z-coordinate Coordinates
| Field Summary | |
|---|---|
private double |
z
z-coordinate |
| Constructor Summary | |
|---|---|
Coordinates3D(double x,
double y,
double z)
constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(Coordinates coordinates)
test if two coordinates3D are equal. |
double |
getDistance(Coordinates coordinates)
get the distance between two coordinates. |
double |
getZ()
get z-coordinate |
void |
setZ(double z)
set z-coordinate |
java.lang.String |
toString()
|
| Methods inherited from class geometry.Coordinates2D |
|---|
getX, getY, isNeighbor, setX, setY |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private double z
| Constructor Detail |
|---|
public Coordinates3D(double x,
double y,
double z)
x - x-coordinatey - y-coordinatez - z-coordinate| Method Detail |
|---|
public boolean equals(Coordinates coordinates)
equals in interface Coordinatesequals in class Coordinates2Dcoordinates -
public double getZ()
getZ in interface CoordinatesgetZ in class Coordinates2Dpublic void setZ(double z)
setZ in interface CoordinatessetZ in class Coordinates2Dz - public double getDistance(Coordinates coordinates)
Coordinates
getDistance in interface CoordinatesgetDistance in class Coordinates2Dcoordinates - the coordinates to get the distance from
public java.lang.String toString()
toString in class Coordinates2D
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||