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