mil.navy.nps.rra
Class Vec3d

java.lang.Object
  |
  +--mil.navy.nps.rra.Vec3d

public class Vec3d
extends java.lang.Object

Vector arithmetic routines for 3-element vectors of type Double.


Constructor Summary
Vec3d()
           
Vec3d(double[] vec)
           
Vec3d(double v0, double v1, double v2)
           
Vec3d(Vec3d vec)
           
 
Method Summary
 void add(Vec3d vec)
           
 void add(Vec3d vec1, Vec3d vec2)
           
 void cross(Vec3d vec)
           
 void cross(Vec3d vec1, Vec3d vec2)
           
 double dot(Vec3d vec)
           
static double dot(Vec3d vec1, Vec3d vec2)
           
 void get(double[] vec)
           
 void get(double[] v0, double[] v1, double[] v2)
           
 double get(int index)
           
 void get(Vec3d vec)
           
 double length_sqr()
           
 double length()
           
 void makeNull()
           
 void negate()
           
 void negate(Vec3d vec)
           
 void normalize()
           
 void normalize(Vec3d vec)
           
 void print()
           
 void scale(double s)
           
 void scale(double s, Vec3d vec)
           
 void set(double[] vec)
           
 void set(double v0, double v1, double v2)
           
 void set(int index, double val)
           
 void set(Vec3d vec)
           
 void sub(Vec3d vec)
           
 void sub(Vec3d vec1, Vec3d vec2)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Vec3d

public Vec3d()

Vec3d

public Vec3d(double v0,
             double v1,
             double v2)

Vec3d

public Vec3d(double[] vec)

Vec3d

public Vec3d(Vec3d vec)
Method Detail

print

public void print()

set

public void set(double v0,
                double v1,
                double v2)

get

public void get(double[] v0,
                double[] v1,
                double[] v2)

set

public void set(int index,
                double val)

get

public double get(int index)

set

public void set(double[] vec)

get

public void get(double[] vec)

set

public void set(Vec3d vec)

get

public void get(Vec3d vec)

makeNull

public void makeNull()

negate

public void negate()

negate

public void negate(Vec3d vec)

add

public void add(Vec3d vec)

add

public void add(Vec3d vec1,
                Vec3d vec2)

sub

public void sub(Vec3d vec)

sub

public void sub(Vec3d vec1,
                Vec3d vec2)

scale

public void scale(double s)

scale

public void scale(double s,
                  Vec3d vec)

length

public double length()

length_sqr

public double length_sqr()

normalize

public void normalize()

normalize

public void normalize(Vec3d vec)

dot

public double dot(Vec3d vec)

dot

public static double dot(Vec3d vec1,
                         Vec3d vec2)

cross

public void cross(Vec3d vec)

cross

public void cross(Vec3d vec1,
                  Vec3d vec2)