Package org.joml
Class Quaterniond
java.lang.Object
org.joml.Quaterniond
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
,Quaterniondc
public class Quaterniond extends java.lang.Object implements java.io.Externalizable, Quaterniondc
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Quaterniond()
Quaterniond(double x, double y, double z)
Quaterniond(double x, double y, double z, double w)
Quaterniond(AxisAngle4d axisAngle)
Quaterniond(AxisAngle4f axisAngle)
Quaterniond(Quaterniondc source)
Quaterniond(Quaternionfc source)
-
Method Summary
Modifier and Type Method Description Quaterniond
add(double x, double y, double z, double w)
Quaterniond
add(double x, double y, double z, double w, Quaterniond dest)
Quaterniond
add(Quaterniondc q2)
Quaterniond
add(Quaterniondc q2, Quaterniond dest)
double
angle()
Quaterniond
conjugate()
Quaterniond
conjugate(Quaterniond dest)
Quaterniond
difference(Quaterniondc other)
Quaterniond
difference(Quaterniondc other, Quaterniond dest)
Quaterniond
div(Quaterniondc b)
Quaterniond
div(Quaterniondc b, Quaterniond dest)
double
dot(Quaterniondc otherQuat)
boolean
equals(java.lang.Object obj)
Quaterniond
fromAxisAngleDeg(double axisX, double axisY, double axisZ, double angle)
Quaterniond
fromAxisAngleDeg(Vector3dc axis, double angle)
Quaterniond
fromAxisAngleRad(double axisX, double axisY, double axisZ, double angle)
Quaterniond
fromAxisAngleRad(Vector3dc axis, double angle)
Matrix3d
get(Matrix3d dest)
Matrix3f
get(Matrix3f dest)
Matrix4d
get(Matrix4d dest)
Matrix4f
get(Matrix4f dest)
Quaterniond
get(Quaterniond dest)
Vector3d
getEulerAnglesXYZ(Vector3d eulerAngles)
int
hashCode()
Quaterniond
identity()
Quaterniond
integrate(double dt, double vx, double vy, double vz)
Quaterniond
integrate(double dt, double vx, double vy, double vz, Quaterniond dest)
Quaterniond
invert()
Quaterniond
invert(Quaterniond dest)
double
lengthSquared()
Quaterniond
lookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ)
Quaterniond
lookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Quaterniond dest)
Quaterniond
lookAlong(Vector3dc dir, Vector3dc up)
Quaterniond
lookAlong(Vector3dc dir, Vector3dc up, Quaterniond dest)
Quaterniond
mul(double qx, double qy, double qz, double qw)
Quaterniond
mul(double qx, double qy, double qz, double qw, Quaterniond dest)
Quaterniond
mul(Quaterniondc q)
Quaterniond
mul(Quaterniondc q, Quaterniond dest)
static Quaterniondc
nlerp(Quaterniond[] qs, double[] weights, Quaterniond dest)
Quaterniond
nlerp(Quaterniondc q, double factor)
Quaterniond
nlerp(Quaterniondc q, double factor, Quaterniond dest)
static Quaterniond
nlerpIterative(Quaterniondc[] qs, double[] weights, double dotThreshold, Quaterniond dest)
Quaterniond
nlerpIterative(Quaterniondc q, double alpha, double dotThreshold)
Quaterniond
nlerpIterative(Quaterniondc q, double alpha, double dotThreshold, Quaterniond dest)
Quaterniond
normalize()
Quaterniond
normalize(Quaterniond dest)
Vector3d
normalizedPositiveX(Vector3d dir)
Vector3d
normalizedPositiveY(Vector3d dir)
Vector3d
normalizedPositiveZ(Vector3d dir)
Vector3d
positiveX(Vector3d dir)
Vector3d
positiveY(Vector3d dir)
Vector3d
positiveZ(Vector3d dir)
Quaterniond
premul(double qx, double qy, double qz, double qw)
Quaterniond
premul(double qx, double qy, double qz, double qw, Quaterniond dest)
Quaterniond
premul(Quaterniondc q)
Quaterniond
premul(Quaterniondc q, Quaterniond dest)
void
readExternal(java.io.ObjectInput in)
Quaterniond
rotate(double angleX, double angleY, double angleZ)
Quaterniond
rotate(double angleX, double angleY, double angleZ, Quaterniond dest)
Quaterniond
rotate(Vector3dc anglesXYZ)
Quaterniond
rotate(Vector3dc anglesXYZ, Quaterniond dest)
Quaterniond
rotateAxis(double angle, double axisX, double axisY, double axisZ)
Quaterniond
rotateAxis(double angle, double axisX, double axisY, double axisZ, Quaterniond dest)
Quaterniond
rotateAxis(double angle, Vector3dc axis)
Quaterniond
rotateAxis(double angle, Vector3dc axis, Quaterniond dest)
Quaterniond
rotateLocal(double angleX, double angleY, double angleZ)
Quaterniond
rotateLocal(double angleX, double angleY, double angleZ, Quaterniond dest)
Quaterniond
rotateLocalX(double angle)
Quaterniond
rotateLocalX(double angle, Quaterniond dest)
Quaterniond
rotateLocalY(double angle)
Quaterniond
rotateLocalY(double angle, Quaterniond dest)
Quaterniond
rotateLocalZ(double angle)
Quaterniond
rotateLocalZ(double angle, Quaterniond dest)
Quaterniond
rotateTo(double fromDirX, double fromDirY, double fromDirZ, double toDirX, double toDirY, double toDirZ)
Quaterniond
rotateTo(double fromDirX, double fromDirY, double fromDirZ, double toDirX, double toDirY, double toDirZ, Quaterniond dest)
Quaterniond
rotateTo(Vector3dc fromDir, Vector3dc toDir)
Quaterniond
rotateTo(Vector3dc fromDir, Vector3dc toDir, Quaterniond dest)
Quaterniond
rotateX(double angle)
Quaterniond
rotateX(double angle, Quaterniond dest)
Quaterniond
rotateXYZ(double angleX, double angleY, double angleZ)
Quaterniond
rotateXYZ(double angleX, double angleY, double angleZ, Quaterniond dest)
Quaterniond
rotateY(double angle)
Quaterniond
rotateY(double angle, Quaterniond dest)
Quaterniond
rotateYXZ(double angleZ, double angleY, double angleX)
Quaterniond
rotateYXZ(double angleY, double angleX, double angleZ, Quaterniond dest)
Quaterniond
rotateZ(double angle)
Quaterniond
rotateZ(double angle, Quaterniond dest)
Quaterniond
rotateZYX(double angleZ, double angleY, double angleX)
Quaterniond
rotateZYX(double angleZ, double angleY, double angleX, Quaterniond dest)
Quaterniond
rotation(double angleX, double angleY, double angleZ)
Quaterniond
rotationAxis(double angle, double axisX, double axisY, double axisZ)
Quaterniond
rotationAxis(AxisAngle4f axisAngle)
Quaterniond
rotationTo(double fromDirX, double fromDirY, double fromDirZ, double toDirX, double toDirY, double toDirZ)
Quaterniond
rotationTo(Vector3dc fromDir, Vector3dc toDir)
Quaterniond
rotationX(double angle)
Quaterniond
rotationXYZ(double angleX, double angleY, double angleZ)
Quaterniond
rotationY(double angle)
Quaterniond
rotationYXZ(double angleY, double angleX, double angleZ)
Quaterniond
rotationZ(double angle)
Quaterniond
rotationZYX(double angleZ, double angleY, double angleX)
Quaterniond
scale(double factor)
Quaterniond
scale(double factor, Quaterniond dest)
Quaterniond
scaling(float factor)
Quaterniond
set(double x, double y, double z)
Quaterniond
set(double x, double y, double z, double w)
Quaterniond
set(AxisAngle4d axisAngle)
Quaterniond
set(AxisAngle4f axisAngle)
Quaterniond
set(Quaterniondc q)
Quaterniond
set(Quaternionfc q)
Quaterniond
setAngleAxis(double angle, double x, double y, double z)
Quaterniond
setAngleAxis(double angle, Vector3dc axis)
Quaterniond
setFromNormalized(Matrix3dc mat)
Quaterniond
setFromNormalized(Matrix3fc mat)
Quaterniond
setFromNormalized(Matrix4dc mat)
Quaterniond
setFromNormalized(Matrix4fc mat)
Quaterniond
setFromNormalized(Matrix4x3dc mat)
Quaterniond
setFromNormalized(Matrix4x3fc mat)
Quaterniond
setFromUnnormalized(Matrix3dc mat)
Quaterniond
setFromUnnormalized(Matrix3fc mat)
Quaterniond
setFromUnnormalized(Matrix4dc mat)
Quaterniond
setFromUnnormalized(Matrix4fc mat)
Quaterniond
setFromUnnormalized(Matrix4x3dc mat)
Quaterniond
setFromUnnormalized(Matrix4x3fc mat)
static Quaterniondc
slerp(Quaterniond[] qs, double[] weights, Quaterniond dest)
Quaterniond
slerp(Quaterniondc target, double alpha)
Quaterniond
slerp(Quaterniondc target, double alpha, Quaterniond dest)
Quaterniondc
toImmutable()
java.lang.String
toString()
java.lang.String
toString(java.text.NumberFormat formatter)
Vector3d
transform(double x, double y, double z, Vector3d dest)
Vector4d
transform(double x, double y, double z, Vector4d dest)
Vector3d
transform(Vector3d vec)
Vector3d
transform(Vector3dc vec, Vector3d dest)
Vector4d
transform(Vector4d vec)
Vector4d
transform(Vector4dc vec, Vector4d dest)
double
w()
void
writeExternal(java.io.ObjectOutput out)
double
x()
double
y()
double
z()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
x
public double x -
y
public double y -
z
public double z -
w
public double w
-
-
Constructor Details
-
Quaterniond
public Quaterniond() -
Quaterniond
public Quaterniond(double x, double y, double z, double w) -
Quaterniond
public Quaterniond(double x, double y, double z) -
Quaterniond
-
Quaterniond
-
Quaterniond
-
Quaterniond
-
-
Method Details
-
x
public double x()- Specified by:
x
in interfaceQuaterniondc
-
y
public double y()- Specified by:
y
in interfaceQuaterniondc
-
z
public double z()- Specified by:
z
in interfaceQuaterniondc
-
w
public double w()- Specified by:
w
in interfaceQuaterniondc
-
normalize
-
normalize
- Specified by:
normalize
in interfaceQuaterniondc
-
add
-
add
- Specified by:
add
in interfaceQuaterniondc
-
add
-
add
- Specified by:
add
in interfaceQuaterniondc
-
dot
- Specified by:
dot
in interfaceQuaterniondc
-
angle
public double angle()- Specified by:
angle
in interfaceQuaterniondc
-
get
- Specified by:
get
in interfaceQuaterniondc
-
get
- Specified by:
get
in interfaceQuaterniondc
-
get
- Specified by:
get
in interfaceQuaterniondc
-
get
- Specified by:
get
in interfaceQuaterniondc
-
get
- Specified by:
get
in interfaceQuaterniondc
-
set
-
set
-
set
-
set
-
set
-
set
-
setAngleAxis
-
setAngleAxis
-
setFromUnnormalized
-
setFromUnnormalized
-
setFromUnnormalized
-
setFromNormalized
-
setFromNormalized
-
setFromNormalized
-
setFromUnnormalized
-
setFromNormalized
-
setFromUnnormalized
-
setFromNormalized
-
setFromUnnormalized
-
setFromNormalized
-
fromAxisAngleRad
-
fromAxisAngleRad
-
fromAxisAngleDeg
-
fromAxisAngleDeg
-
mul
-
mul
- Specified by:
mul
in interfaceQuaterniondc
-
mul
-
mul
- Specified by:
mul
in interfaceQuaterniondc
-
premul
-
premul
- Specified by:
premul
in interfaceQuaterniondc
-
premul
-
premul
- Specified by:
premul
in interfaceQuaterniondc
-
transform
- Specified by:
transform
in interfaceQuaterniondc
-
transform
- Specified by:
transform
in interfaceQuaterniondc
-
transform
- Specified by:
transform
in interfaceQuaterniondc
-
transform
- Specified by:
transform
in interfaceQuaterniondc
-
transform
- Specified by:
transform
in interfaceQuaterniondc
-
transform
- Specified by:
transform
in interfaceQuaterniondc
-
invert
- Specified by:
invert
in interfaceQuaterniondc
-
invert
-
div
- Specified by:
div
in interfaceQuaterniondc
-
div
-
conjugate
-
conjugate
- Specified by:
conjugate
in interfaceQuaterniondc
-
identity
-
lengthSquared
public double lengthSquared()- Specified by:
lengthSquared
in interfaceQuaterniondc
-
rotationXYZ
-
rotationZYX
-
rotationYXZ
-
slerp
-
slerp
- Specified by:
slerp
in interfaceQuaterniondc
-
slerp
-
scale
-
scale
- Specified by:
scale
in interfaceQuaterniondc
-
scaling
-
integrate
-
integrate
- Specified by:
integrate
in interfaceQuaterniondc
-
nlerp
-
nlerp
- Specified by:
nlerp
in interfaceQuaterniondc
-
nlerp
-
nlerpIterative
public Quaterniond nlerpIterative(Quaterniondc q, double alpha, double dotThreshold, Quaterniond dest)- Specified by:
nlerpIterative
in interfaceQuaterniondc
-
nlerpIterative
-
nlerpIterative
public static Quaterniond nlerpIterative(Quaterniondc[] qs, double[] weights, double dotThreshold, Quaterniond dest) -
lookAlong
-
lookAlong
- Specified by:
lookAlong
in interfaceQuaterniondc
-
lookAlong
public Quaterniond lookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ) -
lookAlong
public Quaterniond lookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Quaterniond dest)- Specified by:
lookAlong
in interfaceQuaterniondc
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
toString
public java.lang.String toString(java.text.NumberFormat formatter) -
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-
difference
-
difference
- Specified by:
difference
in interfaceQuaterniondc
-
rotationTo
public Quaterniond rotationTo(double fromDirX, double fromDirY, double fromDirZ, double toDirX, double toDirY, double toDirZ) -
rotationTo
-
rotateTo
public Quaterniond rotateTo(double fromDirX, double fromDirY, double fromDirZ, double toDirX, double toDirY, double toDirZ, Quaterniond dest)- Specified by:
rotateTo
in interfaceQuaterniondc
-
rotationAxis
-
rotationAxis
-
rotation
-
rotationX
-
rotationY
-
rotationZ
-
rotateTo
public Quaterniond rotateTo(double fromDirX, double fromDirY, double fromDirZ, double toDirX, double toDirY, double toDirZ) -
rotateTo
- Specified by:
rotateTo
in interfaceQuaterniondc
-
rotateTo
-
rotate
- Specified by:
rotate
in interfaceQuaterniondc
-
rotate
-
rotate
-
rotate
- Specified by:
rotate
in interfaceQuaterniondc
-
rotateLocal
-
rotateLocal
- Specified by:
rotateLocal
in interfaceQuaterniondc
-
rotateX
-
rotateX
- Specified by:
rotateX
in interfaceQuaterniondc
-
rotateY
-
rotateY
- Specified by:
rotateY
in interfaceQuaterniondc
-
rotateZ
-
rotateZ
- Specified by:
rotateZ
in interfaceQuaterniondc
-
rotateLocalX
-
rotateLocalX
- Specified by:
rotateLocalX
in interfaceQuaterniondc
-
rotateLocalY
-
rotateLocalY
- Specified by:
rotateLocalY
in interfaceQuaterniondc
-
rotateLocalZ
-
rotateLocalZ
- Specified by:
rotateLocalZ
in interfaceQuaterniondc
-
rotateXYZ
-
rotateXYZ
- Specified by:
rotateXYZ
in interfaceQuaterniondc
-
rotateZYX
-
rotateZYX
- Specified by:
rotateZYX
in interfaceQuaterniondc
-
rotateYXZ
-
rotateYXZ
- Specified by:
rotateYXZ
in interfaceQuaterniondc
-
getEulerAnglesXYZ
- Specified by:
getEulerAnglesXYZ
in interfaceQuaterniondc
-
rotateAxis
public Quaterniond rotateAxis(double angle, double axisX, double axisY, double axisZ, Quaterniond dest)- Specified by:
rotateAxis
in interfaceQuaterniondc
-
rotateAxis
- Specified by:
rotateAxis
in interfaceQuaterniondc
-
rotateAxis
-
rotateAxis
-
positiveX
- Specified by:
positiveX
in interfaceQuaterniondc
-
normalizedPositiveX
- Specified by:
normalizedPositiveX
in interfaceQuaterniondc
-
positiveY
- Specified by:
positiveY
in interfaceQuaterniondc
-
normalizedPositiveY
- Specified by:
normalizedPositiveY
in interfaceQuaterniondc
-
positiveZ
- Specified by:
positiveZ
in interfaceQuaterniondc
-
normalizedPositiveZ
- Specified by:
normalizedPositiveZ
in interfaceQuaterniondc
-
toImmutable
-