vec_math
Class Vector3D

java.lang.Object
  extended by vec_math.VectorG
      extended by vec_math.Vector3D
All Implemented Interfaces:
Serializable, Cloneable

public class Vector3D
extends VectorG

This class is the definition of a simple, three dimensional vector. Additional features are provided to make its use easier to Nvector.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class vec_math.VectorG
VectorG.CloneTest, VectorG.EuclidianMetric, VectorG.LengthComparator, VectorG.Metric
 
Field Summary
private static String[] NAMES
          The names of the coorduinates.
 
Fields inherited from class vec_math.VectorG
a
 
Constructor Summary
Vector3D()
          Constructs a new 2D vector with its two components separated.
Vector3D(double x, double y, double z)
          Constructs a new 2D vector with its two components separated.
Vector3D(String xy)
          Constructs a new Vector2D from a string.
 
Method Summary
 double getX()
          Returns the x coordinate.
 double getY()
          Returns the y coordinate.
 double getZ()
          Returns the z coordinate.
 void setX(double x)
          Sets the x value.
 void setY(double y)
          Sets the y value.
 void setZ(double x)
          Sets the x value.
 String toString()
          Converts this 3D vector into a String.
 
Methods inherited from class vec_math.VectorG
add, clone, dimension, direct, directDivide, directMultiply, dot, doubleParse, equalData, equals, fillFrom, fillFrom, fromDoubles, fromString, get, getAsArray, getLength, hashCode, match, match, multiply, parse, search, searchMinMax, set, sort, sortToLength, subtract
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NAMES

private static final String[] NAMES
The names of the coorduinates.

Constructor Detail

Vector3D

public Vector3D()
Constructs a new 2D vector with its two components separated. This version creates a new two dimensional array, so reuse of the arguments is safe.


Vector3D

public Vector3D(double x,
                double y,
                double z)
Constructs a new 2D vector with its two components separated. This version creates a new two dimensional array, so reuse of the arguments is safe.


Vector3D

public Vector3D(String xy)
Constructs a new Vector2D from a string.

Method Detail

getX

public double getX()
Returns the x coordinate.


getY

public double getY()
Returns the y coordinate.


getZ

public double getZ()
Returns the z coordinate.


setX

public void setX(double x)
Sets the x value.


setY

public void setY(double y)
Sets the y value.


setZ

public void setZ(double x)
Sets the x value.


toString

public String toString()
Converts this 3D vector into a String.

Overrides:
toString in class VectorG