public final class Quaternion extends Rotation
QuaternionHelper| Modifier and Type | Field and Description |
|---|---|
static Quaternion |
NO_ROTATION
Represents no rotation.
|
static Quaternion |
X_180
Represents a rotation of 180 degrees around the x-axis.
|
static Quaternion |
X_270
Represents a rotation of 270 degrees around the x-axis.
|
static Quaternion |
X_90
Represents a rotation of 90 degrees around the x-axis.
|
static Quaternion |
Y_180
Represents a rotation of 180 degrees around the y-axis.
|
static Quaternion |
Y_270
Represents a rotation of 270 degrees around the y-axis.
|
static Quaternion |
Y_90
Represents a rotation of 90 degrees around the y-axis.
|
static Quaternion |
Z_180
Represents a rotation of 180 degrees around the z-axis.
|
static Quaternion |
Z_270
Represents a rotation of 270 degrees around the z-axis.
|
static Quaternion |
Z_90
Represents a rotation of 90 degrees around the z-axis.
|
| Modifier and Type | Method and Description |
|---|---|
static Quaternion |
create(Vec<Three> axis,
double angle)
Creates a Quaternion using a rotation axis and and a rotation angle which is measured in degrees.
|
static Quaternion |
createFromAxisAngle(AxisAngle aa)
Creates a
Quaternion using an already created AxisAngle. |
protected Mat<Three,Three> |
createRotationMatrix() |
boolean |
equals(java.lang.Object o) |
double |
getW() |
double |
getX() |
double |
getY() |
double |
getZ() |
int |
hashCode() |
boolean |
resembles(java.lang.Object o) |
java.lang.String |
toString() |
public static final Quaternion NO_ROTATION
public static final Quaternion X_90
public static final Quaternion X_180
public static final Quaternion X_270
public static final Quaternion Y_90
public static final Quaternion Y_180
public static final Quaternion Y_270
public static final Quaternion Z_90
public static final Quaternion Z_180
public static final Quaternion Z_270
public static Quaternion create(Vec<Three> axis, double angle)
axis - the axis of the rotationangle - the angle of the rotationQuaternion object with the corresponding valuesjava.lang.NullPointerException - if axis is nulljava.lang.IllegalArgumentException - if axis is a zero vectorjava.lang.IllegalArgumentException - if angle is equal to (+/-)Infinity or NaNpublic static Quaternion createFromAxisAngle(AxisAngle aa)
Quaternion using an already created AxisAngle.aa - the axis-angleQuaternion object which represents the same rotation as the AxisAnglejava.lang.NullPointerException - if aa is nullpublic boolean resembles(java.lang.Object o)
resembles in class GeometrixObjectpublic boolean equals(java.lang.Object o)
equals in class GeometrixObjectpublic int hashCode()
hashCode in class GeometrixObjectpublic java.lang.String toString()
toString in class GeometrixObjectpublic double getX()
public double getY()
public double getZ()
public double getW()