AbstractProtected_Internal typed array storage for quaternion components [x, y, z, w].
Gets the class name of the quaternion implementation.
The name of the constructor function
Gets the w component (scalar part) of the quaternion.
The w component value
Gets the x component (i coefficient) of the quaternion.
The x component value
Gets the y component (j coefficient) of the quaternion.
The y component value
Gets the z component (k coefficient) of the quaternion.
The z component value
Gets the component at the specified index.
The index (0=x, 1=y, 2=z, 3=w)
The component value at the given index
Creates a deep copy of this quaternion.
A new quaternion instance with the same values
Calculates the dot product between this quaternion and another quaternion. The dot product of two quaternions gives a scalar value that represents the cosine of half the angle between them when both quaternions are unit quaternions.
The quaternion to compute the dot product with
The dot product result
Checks if this quaternion is approximately equal to another quaternion within a tolerance.
Optional_delta: numberTrue if quaternions are approximately equal, false otherwise
Checks if this quaternion is exactly equal to another quaternion.
True if quaternions are exactly equal, false otherwise
Calculates the magnitude (length) of the quaternion.
The Euclidean norm of the quaternion
Calculates the squared magnitude of the quaternion. This is more efficient than length() when you only need to compare magnitudes.
The squared Euclidean norm of the quaternion
Converts the quaternion to Euler angles and stores the result in the output vector.
The output vector containing the Euler angles
Transforms a 3D vector by this quaternion rotation and stores the result in the output vector.
The output vector containing the transformed result
Abstract base class for quaternion implementations.
Quaternions are a mathematical system that extends complex numbers and are commonly used in 3D graphics for representing rotations. A quaternion consists of four components (x, y, z, w) where (x, y, z) represents the vector part and w represents the scalar part.
This abstract class provides common functionality and interface for all quaternion implementations while leaving specific operations to be implemented by concrete subclasses.