|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.hermetica.vecmath.Vec3d
Field Summary | |
double |
x
The x coordinate |
double |
y
The y coordinate |
double |
z
The z coordinate |
Constructor Summary | |
Vec3d()
Constructs and initializes a Vec3d to ( 0, 0, 0 ) |
|
Vec3d(double[] ary)
Constructs and initializes a Vec3d from the array of length 3 |
|
Vec3d(double x,
double y,
double z)
Constructs and initializes a Vec3d from the specified xyz co-ordinates |
|
Vec3d(Vec3d vec)
Constructs and initializes a Vec3d from the specified Vec3d |
Method Summary | |
void |
add(Vec3d v1)
Sets the values of this vector to the vector sum of itself and vector v1. |
void |
add(Vec3d v1,
Vec3d v2)
Sets the value of this vector to the vector sum of vectors v1 and v2 |
void |
cross(Vec3d v1,
Vec3d v2)
Sets this vector to be the cross product of vectors v1 and v2 |
double |
distance(Vec3d v1)
Computes the distance between this vector and vector v1 |
double |
distanceSquared(Vec3d v1)
Computes the square of the distance between this vector and vector v1. |
double |
dot(Vec3d v1)
Computes the dot product of this vector and vector v1 |
boolean |
equals(Vec3d v1)
Returns true if all of the data members of Vec3d v1 are equal to the corresponding data members in this Vec3d. |
void |
get(double[] ary)
Gets the value of this vector and copies the values into v[] |
int |
hashCode()
Returns a hash number based on the data values in this object |
double |
length()
Returns the length of this vector |
double |
lengthSquared()
Returns the squared length of this vector |
void |
negate()
Inverts the value of this vector in place |
void |
negate(Vec3d v1)
Sets the value of this vector to the inverse of vector v1 |
void |
normalize()
Normalizes this vector in place. |
void |
scale(double s)
Sets the value of this vector to the scalar multiplication of the scale factor with this. |
void |
scale(double s,
Vec3d v1)
Sets the value of this vector to the scalar multiplication of vector v1. |
void |
scaleAdd(double s,
Vec3d v1,
Vec3d v2)
Sets the value of this vector to the scalar multiplication of vector v1 plus vector v2 ( this = s * v1 + v2 ). |
void |
set(double[] ary)
Sets the value of this vector to the xyz co-ordinates specified in the array of length 3. |
void |
set(double x,
double y,
double z)
Sets the value of this vector to the specified xyz co-ordinates |
void |
set(Vec3d v1)
Sets the value of this vector to the value of vector v1. |
void |
set(Vec3f v1)
Sets the value of this vector to the value of vector v1 |
void |
sub(Vec3d v1)
Sets the value of this vector to the vector difference of itself and vector v1 ( this = this - v1 ). |
void |
sub(Vec3d v1,
Vec3d v2)
Sets the value of this vector to the vector difference of vectors v1 and v2 ( this = v1 - v2 ). |
java.lang.String |
toString()
Returns a String that contains the values of this Vec3d |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public double x
public double y
public double z
Constructor Detail |
public Vec3d()
public Vec3d(double x, double y, double z)
public Vec3d(double[] ary)
public Vec3d(Vec3d vec)
Method Detail |
public final void add(Vec3d v1)
public final void add(Vec3d v1, Vec3d v2)
public final void cross(Vec3d v1, Vec3d v2)
public final double distance(Vec3d v1)
public final double distanceSquared(Vec3d v1)
public final double dot(Vec3d v1)
public final boolean equals(Vec3d v1)
public final void get(double[] ary)
public int hashCode()
public final double length()
public final double lengthSquared()
public final void negate()
public final void negate(Vec3d v1)
public final void normalize()
public final void scale(double s)
public final void scale(double s, Vec3d v1)
public final void scaleAdd(double s, Vec3d v1, Vec3d v2)
public final void set(double x, double y, double z)
public final void set(double[] ary)
public final void set(Vec3d v1)
public final void set(Vec3f v1)
public final void sub(Vec3d v1)
public final void sub(Vec3d v1, Vec3d v2)
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |