util
Class Point3D

java.lang.Object
  extended by util.Vector3D
      extended by util.Point3D

public class Point3D
extends Vector3D

This class allows storing 3-D point coordinates.


Field Summary
 
Fields inherited from class util.Vector3D
x, y, z
 
Constructor Summary
Point3D()
          Creates a Point3D object with (0, 0, 0) as the coordinate values.
Point3D(double x, double y, double z)
          Creates a Point3D object with (x, y, and z) coordinate values.
Point3D(Point3D point)
          Creates a Point3D object from a Point3D argument's coordinate values.
Point3D(Vector3D vector)
          Creates a Point3D object from a Vector3D argument's coordinate values.
 
Method Summary
 Point3D clone()
          Creates a new Point3D object from the Point3D's coordinate values.
 void setLocation(double x, double y, double z)
          Sets the Point3D location to the x, y, and Z coordinate values.
 void setLocation(Point3D point)
          Sets the Point3D object to the x, y, and Z coordinate values of another point.
 
Methods inherited from class util.Vector3D
crossProd, crossProd, crossProd, crossProd, diff, diff, diff, diff, distance, distance, distanceSQ, distanceSQ, distanceSQ, dotProd, dotProd, dotProd, dotProd, getX, getY, getZ, magnitude, magnitude, normalize, Print, scale, setComponents, setLocation, sum, sum, sum, sum, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Point3D

public Point3D()
Creates a Point3D object with (0, 0, 0) as the coordinate values.


Point3D

public Point3D(double x,
               double y,
               double z)
Creates a Point3D object with (x, y, and z) coordinate values.

Parameters:
x - the x-coordinate.
y - the y-coordinate.
z - the z-coordinate.

Point3D

public Point3D(Point3D point)
Creates a Point3D object from a Point3D argument's coordinate values.

Parameters:
point - the other point.

Point3D

public Point3D(Vector3D vector)
Creates a Point3D object from a Vector3D argument's coordinate values.

Parameters:
vector - the vector.
Method Detail

clone

public Point3D clone()
Creates a new Point3D object from the Point3D's coordinate values.

Overrides:
clone in class Vector3D
Returns:
the new Point3D object reference.

setLocation

public void setLocation(double x,
                        double y,
                        double z)
Sets the Point3D location to the x, y, and Z coordinate values.

Parameters:
x - the x-coordinate.
y - the y-coordinate.
z - the z-coordinate.

setLocation

public void setLocation(Point3D point)
Sets the Point3D object to the x, y, and Z coordinate values of another point.

Parameters:
point - the other point.