edu.isi.gamebots.examples
Class Vector3D

java.lang.Object
  |
  +--edu.isi.gamebots.examples.Vector3D
All Implemented Interfaces:
Cloneable

public class Vector3D
extends Object
implements Cloneable

Vector3D is a 3 by 1 matrix (or is that 1 by 3?). The 'D' in Vector3D stands for Double, not dimension. This class is based off of a class in the javax.vecmath library. Since I didn't think everyone wanted to install an entire library just for these example implementations, I recreate it here.


Field Summary
 double x
           
 double y
           
 double z
           
 
Constructor Summary
Vector3D()
           
Vector3D(double x, double y, double z)
           
Vector3D(Vector3D vec)
           
 
Method Summary
 boolean near(double x, double y, double z, double delta)
           
 boolean near(Vector3D loc, double delta)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public double x

y

public double y

z

public double z
Constructor Detail

Vector3D

public Vector3D()

Vector3D

public Vector3D(double x,
                double y,
                double z)

Vector3D

public Vector3D(Vector3D vec)
Method Detail

near

public boolean near(Vector3D loc,
                    double delta)

near

public boolean near(double x,
                    double y,
                    double z,
                    double delta)

toString

public String toString()
Overrides:
toString in class Object