|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--raja.Point3D
The Point3D class defines a high precision point in the 3
dimensional space, given by its 3D coordinates. This class provides
most of the classical operations on points (translation, distance...).
Point2D,
Vector3D, Serialized Form| Field Summary | |
double |
x
The x coordinate. |
double |
y
The y coordinate. |
double |
z
The z coordinate. |
| Constructor Summary | |
Point3D(double x,
double y,
double z)
Creates a Point3D object initialized with the specified
3D coordinates. |
|
Point3D(Point3D p)
Initializes a newly created Point3D object so that it
represents the same 3 dimensional point as the argument. |
|
Point3D(Point3D p,
Vector3D v)
Initializes a newly created Point3D object so that it
represents the translation of the specified
Point3D by the specified Vector3D. |
|
| Method Summary | |
static Object |
build(ObjectReader reader)
Creates a Point3D object from the specified
ObjectReader. |
static double |
distance(Point3D p1,
Point3D p2)
Computes the distance between the two specified Point3D. |
static double |
distanceSq(Point3D p1,
Point3D p2)
Computes the square of the distance between the two specified Point3D. |
String |
toString()
Returns a textual String representation of this
Point3D object. |
void |
translate(Vector3D v)
Translates this Point3D by the specified
Vector3D. |
void |
write(ObjectWriter writer)
Writes the contents of this Point3D object to the
specified ObjectWriter. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public double x
public double y
public double z
| Constructor Detail |
public Point3D(double x,
double y,
double z)
Point3D object initialized with the specified
3D coordinates.x, y, z - the coordinates to which to set the newly
constructed Point3D.public Point3D(Point3D p)
Point3D object so that it
represents the same 3 dimensional point as the argument. In other
words, the newly created Point3D is a copy of the
specified Point3D.p - a Point3D object.
public Point3D(Point3D p,
Vector3D v)
Point3D object so that it
represents the translation of the specified
Point3D by the specified Vector3D.p - a Point3D object.v - a Vector3D object.| Method Detail |
public static Object build(ObjectReader reader)
throws IOException
Point3D object from the specified
ObjectReader.reader - the ObjectReader to read the
fields from.public void translate(Vector3D v)
Point3D by the specified
Vector3D.v - the Vector3D to translate this
Point3D by.
public static double distance(Point3D p1,
Point3D p2)
Point3D.p1, p2 - the two Point3D to compute the
distance between.Point3D.
public static double distanceSq(Point3D p1,
Point3D p2)
Point3D.p1, p2 - the two Point3D to compute the
square of the distance between.Point3D.public String toString()
String representation of this
Point3D object.toString in class Object
public void write(ObjectWriter writer)
throws IOException
Point3D object to the
specified ObjectWriter.write in interface Writablewriter - the ObjectWriter to write the
fields to.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||