|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.geom.Point2D
java.awt.geom.Point2D.Double
org.haphazard.util.Point3D
A point in 3D space
| Nested Class Summary |
| Nested classes inherited from class java.awt.geom.Point2D |
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float |
| Field Summary | |
double |
z
The Z coordinate |
| Fields inherited from class java.awt.geom.Point2D.Double |
x, y |
| Constructor Summary | |
Point3D()
Creates a new Point3D with the coordinates {0,0,0} |
|
Point3D(double x,
double y,
double z)
Creates a new instance of Point3D |
|
| Method Summary | |
void |
add(Point3D point)
Adds a point to the point |
void |
add(Vector3D vector)
Adds a vector to the point |
java.lang.Object |
clone()
Clones this object |
double |
distance(Point3D point)
Calculates the distance to another point |
boolean |
equals(Point3D point)
Checks if this point is approximately equal to another point |
boolean |
equals(Point3D point,
double error)
Checks if this point is approximately equal to another point |
double |
getZ()
Gets the z-coordinate |
void |
setLocation(double x,
double y,
double z)
Sets the coordinates of this Point |
java.lang.String |
toString()
Transforms this object into a String on the form {x,y,z} |
| Methods inherited from class java.awt.geom.Point2D.Double |
getX, getY, setLocation |
| Methods inherited from class java.awt.geom.Point2D |
distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public double z
| Constructor Detail |
public Point3D()
public Point3D(double x,
double y,
double z)
x - The x-coordinatey - The y-coordinatez - The z-coordinate| Method Detail |
public double getZ()
public void setLocation(double x,
double y,
double z)
x - The x-coordinatey - The y-coordinatez - The z-coordinatepublic double distance(Point3D point)
point - The point to calculate the distance to
public void add(Vector3D vector)
vector - The vector to addpublic void add(Point3D point)
point - The point to addpublic java.lang.String toString()
public boolean equals(Point3D point)
point - The point to check against
public boolean equals(Point3D point,
double error)
point - The point to check againsterror - The error margin
public java.lang.Object clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||