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