public class Vector3f extends Tuple3f
Constructor | Description |
---|---|
Vector3f() |
Modifier and Type | Method | Description |
---|---|---|
float |
angle(Vector3f v1) |
Returns the angle in radians between this vector and the vector parameter;
the return value is constrained to the range [0,PI].
|
void |
cross(Vector3f v1,
Vector3f v2) |
Sets this vector to be the vector cross product of vectors v1 and v2.
|
float |
dot(Vector3f v) |
Computes the dot product of the this vector and vector v.
|
float |
length() |
Returns the length of this vector.
|
float |
lengthSquared() |
Returns the squared length of this vector.
|
static Vector3f |
new3(float x,
float y,
float z) |
|
static Vector3f |
newV(Tuple3f t) |
|
void |
normalize() |
Normalizes this vector in place.
|
public static Vector3f new3(float x, float y, float z)
public final float lengthSquared()
public final float length()
public final void cross(Vector3f v1, Vector3f v2)
v1
- the first vectorv2
- the second vectorpublic final float dot(Vector3f v)
v
- the other vectorpublic final void normalize()
public final float angle(Vector3f v1)
v1
- the other vector