JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.alsUtility
Class Vector3d

java.lang.Object
  extended bygov.nasa.alsUtility.Vector3d
All Implemented Interfaces:
java.io.Serializable

public class Vector3d
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
 double x
           
 double y
           
 double z
           
 
Constructor Summary
Vector3d()
           
Vector3d(double[] xyz)
           
Vector3d(double x, double y, double z)
           
Vector3d(Vector3d v)
           
 
Method Summary
 Vector3d add(Vector3d other)
           
 void add(Vector3d first, Vector3d second)
           
 double angle(Vector3d v)
           
static Vector3d[] calculateTranslations(Vector3d stay, Vector3d move, double start, double end, int number)
           
 void cross(Vector3d v1, Vector3d v2)
           
 double distanceTo(Vector3d other)
           
 double distanceToSquared(Vector3d other)
           
 double dot(Vector3d other)
           
 boolean equals(Vector3d v)
           
static Vector3d factoryRandom(DoubleInterval interval)
           
 double getX()
           
 double getY()
           
 double getZ()
           
 int hashCode()
           
 double length()
           
 Vector3d multiply(double d)
           
static Vector3d multiply(Vector3d first, double d)
           
 boolean nearlyEqual(Vector3d v)
           
 void negate()
           
 void negate(Vector3d v1)
           
 void normalize()
           
 void scale(double d)
           
 void scale(double d, Vector3d v1)
           
 void set(Vector3d v1)
           
 void setX(double d)
           
 void setY(double d)
           
 void setZ(double d)
           
 void sub(Vector3d first, Vector3d second)
           
 Vector3d subtract(Vector3d other)
           
static Vector3d subtract(Vector3d first, Vector3d second)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, 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(Vector3d v)

Vector3d

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

Vector3d

public Vector3d(double[] xyz)
Method Detail

distanceTo

public double distanceTo(Vector3d other)

distanceToSquared

public double distanceToSquared(Vector3d other)

getX

public double getX()

getY

public double getY()

getZ

public double getZ()

setX

public void setX(double d)

setY

public void setY(double d)

setZ

public void setZ(double d)

nearlyEqual

public boolean nearlyEqual(Vector3d v)

factoryRandom

public static Vector3d factoryRandom(DoubleInterval interval)

subtract

public static Vector3d subtract(Vector3d first,
                                Vector3d second)

subtract

public Vector3d subtract(Vector3d other)

add

public Vector3d add(Vector3d other)

multiply

public static Vector3d multiply(Vector3d first,
                                double d)

multiply

public Vector3d multiply(double d)

normalize

public void normalize()

length

public double length()

calculateTranslations

public static Vector3d[] calculateTranslations(Vector3d stay,
                                               Vector3d move,
                                               double start,
                                               double end,
                                               int number)

dot

public double dot(Vector3d other)

cross

public void cross(Vector3d v1,
                  Vector3d v2)

angle

public double angle(Vector3d v)

negate

public void negate()

negate

public void negate(Vector3d v1)

scale

public void scale(double d)

scale

public void scale(double d,
                  Vector3d v1)

set

public void set(Vector3d v1)

add

public void add(Vector3d first,
                Vector3d second)

sub

public void sub(Vector3d first,
                Vector3d second)

equals

public boolean equals(Vector3d v)

hashCode

public int hashCode()

JavaGenes, NASA Ames. Written largely by Al Globus