public class Vector3f extends Tuple3f implements Serializable
Constructor and Description |
---|
Vector3f()
Constructs and initializes a Vector3f to (0,0,0).
|
Vector3f(float[] v)
Constructs and initializes a Vector3f from the array of length 3.
|
Vector3f(float x,
float y,
float z)
Constructs and initializes a Vector3f from the specified xyz coordinates.
|
Vector3f(Tuple3d t1)
Constructs and initializes a Vector3f from the specified Tuple3d.
|
Vector3f(Tuple3f t1)
Constructs and initializes a Vector3f from the specified Tuple3f.
|
Vector3f(Vector3d v1)
Constructs and initializes a Vector3f from the specified Vector3d.
|
Vector3f(Vector3f v1)
Constructs and initializes a Vector3f from the specified Vector3f.
|
Modifier and Type | Method and 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 v1)
Computes the dot product of this vector and vector v1.
|
float |
length()
Returns the length of this vector.
|
float |
lengthSquared()
Returns the squared length of this vector.
|
void |
normalize()
Normalizes this vector in place.
|
void |
normalize(Vector3f v1)
Sets the value of this vector to the normalization of vector v1.
|
absolute, absolute, add, add, clamp, clamp, clampMax, clampMax, clampMin, clampMin, clone, epsilonEquals, equals, equals, get, get, getX, getY, getZ, hashCode, interpolate, interpolate, negate, negate, scale, scale, scaleAdd, scaleAdd, set, set, set, set, setX, setY, setZ, sub, sub, toString
public Vector3f(float x, float y, float z)
x
- the x coordinatey
- the y coordinatez
- the z coordinatepublic Vector3f(float[] v)
v
- the array of length 3 containing xyz in orderpublic Vector3f(Vector3f v1)
v1
- the Vector3f containing the initialization x y z datapublic Vector3f(Vector3d v1)
v1
- the Vector3d containing the initialization x y z datapublic Vector3f(Tuple3f t1)
t1
- the Tuple3f containing the initialization x y z datapublic Vector3f(Tuple3d t1)
t1
- the Tuple3d containing the initialization x y z datapublic Vector3f()
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 v1)
v1
- the other vectorpublic final void normalize(Vector3f v1)
v1
- the un-normalized vectorpublic final void normalize()
public final float angle(Vector3f v1)
v1
- the other vectorCopyright © 2016–2022 SciJava. All rights reserved.