Class Point3D

java.lang.Object
  |
  +--Point3D

public class Point3D
extends Object
implements Cloneable, Serializable

Represents a point in 3D space.

Author:
Sasmito Adibowo
See Also:
Serialized Form

Field Summary
 double x
          The X-coordinate of the point.
 double y
          The Y-coordinate of the point.
 double z
          The Z-coordinate of the point.
 
Constructor Summary
Point3D(double X, double Y, double Z)
          Constructs a point from separate (x,y,z) values.
Point3D(Jama.Matrix m)
          Constructs a point from the elements of the matrix in homogeneous coordinate system (x,y,z,1)
 
Method Summary
 Object clone()
           
 void set(Jama.Matrix m)
          Sets the (x,y,z) value based on the specified 4x1 homogeneous 3D vector.
 String toString()
          Returns the string representation of this object.
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

x

public double x
The X-coordinate of the point.

y

public double y
The Y-coordinate of the point.

z

public double z
The Z-coordinate of the point.
Constructor Detail

Point3D

public Point3D(Jama.Matrix m)
Constructs a point from the elements of the matrix in homogeneous coordinate system (x,y,z,1)
Parameters:
m - the column vector matrix (x,y,z,1)

Point3D

public Point3D(double X,
               double Y,
               double Z)
Constructs a point from separate (x,y,z) values.
Parameters:
x - the x coordinate value.
y - the y coordinate value.
z - the z coordinate value.
Method Detail

set

public void set(Jama.Matrix m)
Sets the (x,y,z) value based on the specified 4x1 homogeneous 3D vector.
Parameters:
m - the 4x1 homogeneous 3D vector.

toString

public String toString()
Returns the string representation of this object.
Overrides:
toString in class Object
Returns:
a string in the format (x,y,z).

clone

public Object clone()
Overrides:
clone in class Object