gov.nasa.worldwind.geom
Class Vec4
java.lang.Object
gov.nasa.worldwind.geom.Vec4
public class Vec4
- extends Object
Constructor Summary |
Vec4(double value)
|
Vec4(double x,
double y,
double z)
|
Vec4(double x,
double y,
double z,
double w)
|
Method Summary |
Vec4 |
add3(Vec4 vec4)
|
Angle |
angleBetween3(Vec4 vec4)
|
static Angle |
axisAngle(Vec4 v1,
Vec4 v2,
Vec4[] result)
Compute the angle and rotation axis required to rotate one vector to align with another. |
static Vec4 |
clamp3(Vec4 vec4,
double min,
double max)
|
Vec4 |
cross3(Vec4 vec4)
|
double |
distanceTo3(Vec4 vec4)
|
double |
distanceToSquared3(Vec4 vec4)
|
Vec4 |
divide3(double value)
|
Vec4 |
divide3(Vec4 vec4)
|
double |
dot3(Vec4 vec4)
|
double |
dot4(Vec4 vec4)
|
boolean |
equals(Object obj)
|
static Vec4 |
fromArray3(double[] compArray,
int offset)
|
static Vec4 |
fromArray4(double[] compArray,
int offset)
|
static Vec4 |
fromLine3(Vec4 origin,
double t,
Vec4 direction)
|
double |
getLength3()
|
double |
getLengthSquared3()
|
Vec4 |
getNegative3()
|
double |
getW()
|
double |
getX()
|
double |
getY()
|
double |
getZ()
|
int |
hashCode()
|
static Vec4 |
max3(Vec4 value1,
Vec4 value2)
|
static Vec4 |
min3(Vec4 value1,
Vec4 value2)
|
static Vec4 |
mix3(double amount,
Vec4 value1,
Vec4 value2)
|
Vec4 |
multiply3(double value)
|
Vec4 |
multiply3(Vec4 vec4)
|
Vec4 |
normalize3()
|
Vec4 |
perpendicularTo3(Vec4 vec4)
|
Vec4 |
projectOnto3(Vec4 vec4)
|
Vec4 |
subtract3(Vec4 vec4)
|
double[] |
toArray3(double[] compArray,
int offset)
|
double[] |
toArray4(double[] compArray,
int offset)
|
String |
toString()
|
Vec4 |
transformBy3(Matrix matrix)
|
Vec4 |
transformBy3(Quaternion quaternion)
|
Vec4 |
transformBy4(Matrix matrix)
|
double |
w()
|
double |
x()
|
double |
y()
|
double |
z()
|
INFINITY
public static final Vec4 INFINITY
ONE
public static final Vec4 ONE
UNIT_NEGATIVE_W
public static final Vec4 UNIT_NEGATIVE_W
UNIT_NEGATIVE_X
public static final Vec4 UNIT_NEGATIVE_X
UNIT_NEGATIVE_Y
public static final Vec4 UNIT_NEGATIVE_Y
UNIT_NEGATIVE_Z
public static final Vec4 UNIT_NEGATIVE_Z
UNIT_W
public static final Vec4 UNIT_W
UNIT_X
public static final Vec4 UNIT_X
UNIT_Y
public static final Vec4 UNIT_Y
UNIT_Z
public static final Vec4 UNIT_Z
w
public final double w
x
public final double x
y
public final double y
z
public final double z
ZERO
public static final Vec4 ZERO
Vec4
public Vec4(double value)
Vec4
public Vec4(double x,
double y,
double z)
Vec4
public Vec4(double x,
double y,
double z,
double w)
add3
public final Vec4 add3(Vec4 vec4)
angleBetween3
public final Angle angleBetween3(Vec4 vec4)
axisAngle
public static Angle axisAngle(Vec4 v1,
Vec4 v2,
Vec4[] result)
- Compute the angle and rotation axis required to rotate one vector to align with another.
- Parameters:
v1
- The base vector.v2
- The vector to rotate into alignment with v1
.result
- A reference to an array in which to return the computed axis. May not be null.
- Returns:
- The rotation angle.
- Throws:
IllegalArgumentException
- if any parameter is null.
clamp3
public static Vec4 clamp3(Vec4 vec4,
double min,
double max)
cross3
public final Vec4 cross3(Vec4 vec4)
distanceTo3
public final double distanceTo3(Vec4 vec4)
distanceToSquared3
public final double distanceToSquared3(Vec4 vec4)
divide3
public final Vec4 divide3(double value)
divide3
public final Vec4 divide3(Vec4 vec4)
dot3
public final double dot3(Vec4 vec4)
dot4
public final double dot4(Vec4 vec4)
equals
public final boolean equals(Object obj)
- Overrides:
equals
in class Object
fromArray3
public static Vec4 fromArray3(double[] compArray,
int offset)
fromArray4
public static Vec4 fromArray4(double[] compArray,
int offset)
fromLine3
public static Vec4 fromLine3(Vec4 origin,
double t,
Vec4 direction)
getLength3
public final double getLength3()
getLengthSquared3
public final double getLengthSquared3()
getNegative3
public final Vec4 getNegative3()
getW
public final double getW()
getX
public final double getX()
getY
public final double getY()
getZ
public final double getZ()
hashCode
public final int hashCode()
- Overrides:
hashCode
in class Object
max3
public static Vec4 max3(Vec4 value1,
Vec4 value2)
min3
public static Vec4 min3(Vec4 value1,
Vec4 value2)
mix3
public static Vec4 mix3(double amount,
Vec4 value1,
Vec4 value2)
multiply3
public final Vec4 multiply3(double value)
multiply3
public final Vec4 multiply3(Vec4 vec4)
normalize3
public final Vec4 normalize3()
perpendicularTo3
public final Vec4 perpendicularTo3(Vec4 vec4)
projectOnto3
public final Vec4 projectOnto3(Vec4 vec4)
subtract3
public final Vec4 subtract3(Vec4 vec4)
toArray3
public final double[] toArray3(double[] compArray,
int offset)
toArray4
public final double[] toArray4(double[] compArray,
int offset)
toString
public final String toString()
- Overrides:
toString
in class Object
transformBy3
public final Vec4 transformBy3(Matrix matrix)
transformBy3
public final Vec4 transformBy3(Quaternion quaternion)
transformBy4
public final Vec4 transformBy4(Matrix matrix)
w
public final double w()
x
public final double x()
y
public final double y()
z
public final double z()