public class Vec3d extends Object
| Constructor and Description | 
|---|
| Vec3d()Constructs an Vec3d object. | 
| Vec3d(double[] vec)Constructs an Vec3d object. | 
| Vec3d(double v0,
     double v1,
     double v2)Creates a new Vec3d instance. | 
| Vec3d(Vec3d vec)Constructs an Vec3d object. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | add(Vec3d vec)This method adds up Vec3d object to the array. | 
| void | add(Vec3d vec1,
   Vec3d vec2)This method add Vec3d objects to the v array. | 
| void | cross(Vec3d vec)This method calculates by used Vec3d object. | 
| void | cross(Vec3d vec1,
     Vec3d vec2)This method calculates using Vec3d objects. | 
| double | dot(Vec3d vec)This method returns the result of the multiplication with the array v and Vec3d object. | 
| static double | dot(Vec3d vec1,
   Vec3d vec2)This method is a static method which calculates using Vec3d objects. | 
| void | get(double[] vec)This method gets.. ? | 
| void | get(double[] v0,
   double[] v1,
   double[] v2)This method gets .. ? | 
| double | get(int index)This method returns the array of v by requested of index. | 
| void | get(Vec3d vec)This method gets.. ? | 
| double | length_sqr()This method calculates the square root of the v array value. | 
| double | length()This method calculates the square root of the v array value. | 
| void | makeNull()Initialize the v array. | 
| void | negate()Set negative value to the v array. | 
| void | negate(Vec3d vec)Set negative value to the v array. | 
| void | normalize()This method | 
| void | normalize(Vec3d vec)This method calculate the length of one over. | 
| void | print()This method prints v[0], v[1] and v[2] values. | 
| void | scale(double s)This methods does multiplication the array v with double value. | 
| void | scale(double s,
     Vec3d vec)This methods does multiplication the array v with double value. | 
| void | set(double[] vec)This method sets the array of vector into the array of v. | 
| void | set(double v0,
   double v1,
   double v2)This method sets v0, v1 and v2 value into the array of v. | 
| void | set(int index,
   double val)This method set value into the array of v. | 
| void | set(Vec3d vec)This method sets Vec3d object into the array of v. | 
| void | sub(Vec3d vec)This method performs subtraction. | 
| void | sub(Vec3d vec1,
   Vec3d vec2)This method performs subtraction. | 
public Vec3d()
public Vec3d(double v0,
     double v1,
     double v2)
v0 - double.v1 - double.v2 - double.public Vec3d(double[] vec)
vec - the array of double.public Vec3d(Vec3d vec)
vec - Vec3d object.public void print()
public void set(double v0,
       double v1,
       double v2)
v0 - value of double.v1 - value of double.v2 - value of double.public void get(double[] v0,
       double[] v1,
       double[] v2)
v0 - double.v1 - double.v2 - double.public void set(int index,
       double val)
index - the array index.val - value.public double get(int index)
index - the requested index value.public void set(double[] vec)
vec - the array of vector.public void get(double[] vec)
vec - the array of double.public void set(Vec3d vec)
vec - Vec3d object.public void get(Vec3d vec)
vec - Vec3d object.public void makeNull()
public void negate()
public void negate(Vec3d vec)
vec - Vec3d object.public void add(Vec3d vec)
vec - Vec3d object.public void add(Vec3d vec1, Vec3d vec2)
vec1 - Vec3d object.vec2 - Vec3d object.public void sub(Vec3d vec)
vec - Vec3d object.public void sub(Vec3d vec1, Vec3d vec2)
vec1 - Vec3d object.vec2 - Vec3d object.public void scale(double s)
s - double.public void scale(double s,
         Vec3d vec)
s - double.vec - Vec3d object.public double length()
public double length_sqr()
public void normalize()
public void normalize(Vec3d vec)
vec - Vec3d object.public double dot(Vec3d vec)
vec - Vec3d object.public static double dot(Vec3d vec1, Vec3d vec2)
vec1 - Vec3d object.vec2 - Vec3d object.public void cross(Vec3d vec)
vec - Vec3d object.