public class Quaternion extends Object
Modifier and Type | Field and Description |
---|---|
static Quaternion |
IDENTITY |
double |
w |
double |
x |
double |
y |
double |
z |
Constructor and Description |
---|
Quaternion(double x,
double y,
double z,
double w) |
Modifier and Type | Method and Description |
---|---|
Quaternion |
add(Quaternion quaternion) |
Quaternion |
divideComponents(double value) |
Quaternion |
divideComponents(Quaternion quaternion) |
double |
dot(Quaternion quaternion) |
boolean |
equals(Object obj) |
static Quaternion |
fromArray(double[] compArray,
int offset) |
static Quaternion |
fromAxisAngle(Angle angle,
double axisX,
double axisY,
double axisZ) |
static Quaternion |
fromAxisAngle(Angle angle,
Vec4 axis) |
static Quaternion |
fromLatLon(Angle latitude,
Angle longitude)
Returns a Quaternion created from latitude and longitude rotations.
|
static Quaternion |
fromMatrix(Matrix matrix) |
static Quaternion |
fromRotationXYZ(Angle x,
Angle y,
Angle z)
Returns a Quaternion created from three Euler angle rotations.
|
Angle |
getAngle() |
Vec4 |
getAxis() |
Quaternion |
getConjugate() |
Quaternion |
getInverse() |
LatLon |
getLatLon() |
double |
getLength() |
double |
getLengthSquared() |
Quaternion |
getNegative() |
Angle |
getRotationX() |
Angle |
getRotationY() |
Angle |
getRotationZ() |
double |
getW() |
double |
getX() |
double |
getY() |
double |
getZ() |
int |
hashCode() |
static Quaternion |
mix(double amount,
Quaternion value1,
Quaternion value2) |
Quaternion |
multiply(Quaternion quaternion) |
Quaternion |
multiplyComponents(double value) |
Quaternion |
normalize() |
static Quaternion |
slerp(double amount,
Quaternion value1,
Quaternion value2) |
Quaternion |
subtract(Quaternion quaternion) |
double[] |
toArray(double[] compArray,
int offset) |
String |
toString() |
double |
w() |
double |
x() |
double |
y() |
double |
z() |
public static final Quaternion IDENTITY
public final double w
public final double x
public final double y
public final double z
public final Quaternion add(Quaternion quaternion)
public final Quaternion divideComponents(double value)
public final Quaternion divideComponents(Quaternion quaternion)
public final double dot(Quaternion quaternion)
public static Quaternion fromArray(double[] compArray, int offset)
public static Quaternion fromAxisAngle(Angle angle, double axisX, double axisY, double axisZ)
public static Quaternion fromAxisAngle(Angle angle, Vec4 axis)
public static Quaternion fromLatLon(Angle latitude, Angle longitude)
getLatLon()
.latitude
- Angle rotation of latitude.longitude
- Angle rotation of longitude.public static Quaternion fromMatrix(Matrix matrix)
public static Quaternion fromRotationXYZ(Angle x, Angle y, Angle z)
getRotationX()
, getRotationY()
, getRotationZ()
.x
- Angle rotation about unit-X axis.y
- Angle rotation about unit-Y axis.z
- Angle rotation about unit-Z axis.public final Angle getAngle()
public final Vec4 getAxis()
public final Quaternion getConjugate()
public final Quaternion getInverse()
public final LatLon getLatLon()
public final double getLength()
public final double getLengthSquared()
public final Quaternion getNegative()
public final Angle getRotationX()
public final Angle getRotationY()
public final Angle getRotationZ()
public final double getW()
public final double getX()
public final double getY()
public final double getZ()
public static Quaternion mix(double amount, Quaternion value1, Quaternion value2)
public final Quaternion multiply(Quaternion quaternion)
public final Quaternion multiplyComponents(double value)
public final Quaternion normalize()
public static Quaternion slerp(double amount, Quaternion value1, Quaternion value2)
public final Quaternion subtract(Quaternion quaternion)
public final double[] toArray(double[] compArray, int offset)
public final double w()
public final double x()
public final double y()
public final double z()