Represents a rotation or an orientation of a 3D object.
Quat | Represents a rotation or an orientation of a 3D object. |
x | The factor of i. |
y | The factor of j. |
z | The factor of k. |
w | The scalar part. Sometimes also referred to as 'r'. |
identity[static][const] | The identity quaternion performs no rotation when applied to a vector. |
nan[static][const] | A compile-time constant Quat with value (NaN, NaN, NaN, NaN). |
ctor (+7 overloads) | |
WorldX()[const] | Returns the local +X axis in the post-transformed coordinate space. This is the same as transforming the vector (1,0,0) by this quaternion. |
WorldY()[const] | Returns the local +Y axis in the post-transformed coordinate space. This is the same as transforming the vector (0,1,0) by this quaternion. |
WorldZ()[const] | Returns the local +Z axis in the post-transformed coordinate space. This is the same as transforming the vector (0,0,1) by this quaternion. |
Axis()[const] | Returns the axis of rotation for this quaternion. |
Angle()[const] | Returns the angle of rotation for this quaternion, in radians. |
Dot(rhs)[const] | Computes the dot product of this and the given quaternion. |
LengthSq()[const] | |
Length()[const] | |
Normalize() | Normalizes this quaternion in-place. |
Normalized()[const] | Returns a normalized copy of this quaternion. |
IsNormalized(epsilon)[const] | Returns true if the length of this quaternion is one. |
IsInvertible(epsilon)[const] | |
IsFinite()[const] | Returns true if the entries of this quaternion are all finite. |
Equals(rhs,epsilon)[const] | Returns true if this quaternion equals rhs, up to the given epsilon. |
ptr() (+1 overload) | Returns a pointer to the first element (x). The data is contiguous in memory. ptr[0] gives x, ptr[1] is y, ptr[2] is z and ptr[3] is w. |
Inverse() | Inverses this quaternion in-place. |
Inverted()[const] | Returns an inverted copy of this quaternion. |
InverseAndNormalize() | Inverses this quaternion in-place. |
Conjugate() | Computes the conjugate of this quaternion in-place. |
Conjugated()[const] | Returns a conjugated copy of this quaternion. |
Transform(x,y,z)[const] (+2 overloads) | Rotates the given vector by this quaternion. |
Lerp(target,t)[const] | |
Slerp(target,t)[const] | Implementation based on the math in the book Watt, Policarpo. |
AngleBetween(target)[const] | Returns the angle between this and the target orientation (the shortest route) in radians. |
AxisFromTo(target)[const] | Returns the axis of rotation to get from this orientation to target orientation (the shortest route). |
ToAxisAngle(...)[const] | Returns the rotation axis and angle of this quaternion. |
SetFromAxisAngle(...) | Sets this quaternion by specifying the axis about which the rotation is performed, and the angle of rotation. |
Set(matrix) (+3 overloads) | Sets this quaternion to represent the same rotation as the given matrix. |
ToEulerXYX()[const] | Extracts the rotation part of this quaternion into Euler rotation angles (in radians). |
ToFloat3x3()[const] | |
ToFloat3x4()[const] | |
ToFloat4x4()[const] | |
operator*(rhs)[const] (+1 overload) | Multiplies two quaternions together. |
operator/(rhs)[const] | Divides a quaternion by another. Division "a / b" results in a quaternion that rotates the orientation b to coincide with the orientation a. |
Mul(rhs)[const] (+3 overloads) | Multiplies two quaternions in the order 'this * rhs'. |
Lerp(source,target,t)[static] | |
Slerp(source,target,t)[static] | |
LookAt(...)[static] | Creates a LookAt quaternion. |
RotateX(angleRadians)[static] | Creates a new quaternion that rotates about the positive X axis by the given angle. |
RotateY(angleRadians)[static] | Creates a new quaternion that rotates about the positive Y axis by the given angle. |
RotateZ(angleRadians)[static] | Creates a new quaternion that rotates about the positive Z axis by the given angle. |
RotateAxisAngle(...)[static] | Creates a new Quat that rotates about the given axis by the given angle. |
RotateFromTo(...)[static] (+1 overload) | Creates a new quaternion that rotates sourceDirection vector (in world space) to coincide with the targetDirection vector (in world space). |
FromEuler***(x2,y,x)[static] | Creates a new Quat from the given sequence of Euler rotation angles (in radians). |
RandomRotation(lcg)[static] | Returns a uniformly random unitary quaternion. |
FromString(str)[static] | Parses a string that is of form "x,y,z,w" or "(x,y,z,w)" or "(x;y;z;w)" or "x y z w" to a new quaternion. |