Represents a rotation or an orientation of a 3D object.
![]() | Represents a rotation or an orientation of a 3D object. |
![]() | The factor of i. |
![]() | The factor of j. |
![]() | The factor of k. |
![]() | The scalar part. Sometimes also referred to as 'r'. |
![]() | The identity quaternion performs no rotation when applied to a vector. |
![]() | A compile-time constant Quat with value (NaN, NaN, NaN, NaN). |
![]() | |
![]() | 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. |
![]() | 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. |
![]() | 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. |
![]() | Returns the axis of rotation for this quaternion. |
![]() | Returns the angle of rotation for this quaternion, in radians. |
![]() | Computes the dot product of this and the given quaternion. |
![]() | |
![]() | |
![]() | Normalizes this quaternion in-place. |
![]() | Returns a normalized copy of this quaternion. |
![]() | Returns true if the length of this quaternion is one. |
![]() | |
![]() | Returns true if the entries of this quaternion are all finite. |
![]() | Returns true if this quaternion equals rhs, up to the given epsilon. |
![]() | Compares whether this Quat and the given Quat are identical bit-by-bit in the underlying representation. |
![]() | 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. |
![]() | Inverses this quaternion in-place. |
![]() | Returns an inverted copy of this quaternion. |
![]() | Inverses this quaternion in-place. |
![]() | Computes the conjugate of this quaternion in-place. |
![]() | Returns a conjugated copy of this quaternion. |
![]() | Rotates the given vector by this quaternion. |
![]() | |
![]() | Implementation based on the math in the book Watt, Policarpo. |
![]() | Returns the angle between this and the target orientation (the shortest route) in radians. |
![]() | Returns the axis of rotation to get from this orientation to target orientation (the shortest route). |
![]() | Returns the rotation axis and angle of this quaternion. |
![]() | Sets this quaternion by specifying the axis about which the rotation is performed, and the angle of rotation. |
![]() | Sets this quaternion to represent the same rotation as the given matrix. |
![]() | Extracts the rotation part of this quaternion into Euler rotation angles (in radians). |
![]() | |
![]() | |
![]() | |
![]() | Returns "(x,y,z,w)". |
![]() | Returns "Quat(axis:(x,y,z) angle:degrees)". |
![]() | Returns "x,y,z,w". This is the preferred format for the quaternion if it has to be serialized to a string for machine transfer. |
![]() | Returns a string of C++ code that can be used to construct this object. Useful for generating test cases from badly behaving objects. |
![]() | Multiplies two quaternions together. |
![]() | Divides a quaternion by another. Division "a / b" results in a quaternion that rotates the orientation b to coincide with the orientation a. |
![]() | Unary operator + allows this structure to be used in an expression '+x'. |
![]() | Multiplies two quaternions in the order 'this * rhs'. |
![]() | Negates the quaternion. |
![]() | |
![]() | |
![]() | Returns the 'from' vector rotated towards the 'to' vector by the given normalized time parameter. |
![]() | Returns the 'from' vector rotated towards the 'to' vector by the given absolute angle, in radians. |
![]() | Creates a LookAt quaternion. |
![]() | Creates a new quaternion that rotates about the positive X axis by the given angle. |
![]() | Creates a new quaternion that rotates about the positive Y axis by the given angle. |
![]() | Creates a new quaternion that rotates about the positive Z axis by the given angle. |
![]() | Creates a new Quat that rotates about the given axis by the given angle. |
![]() | Creates a new quaternion that rotates sourceDirection vector (in world space) to coincide with the targetDirection vector (in world space). |
![]() | Creates a new Quat from the given sequence of Euler rotation angles (in radians). |
![]() | Returns a uniformly random unitary quaternion. |
![]() | 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. |