BBMOD_DualQuaternion

constructor

new BBMOD_DualQuaternion([_x, _y, _z, _w, _dx, _dy, _dz, _dw])

Description

A dual quaternion.

Arguments

Name Type Description
_x Real The first component of the real part of the dual quaternion. Defaults to 0.
_y Real The second component of the real part of the dual quaternion. Defaults to 0.
_z Real The third component of the real part of the dual quaternion. Defaults to 0.
_w Real The fourth component of the real part of the dual quaternion. Defaults to 1.
_dx Real The first component of the dual part of the dual quaternion. Defaults to 0.
_dy Real The second component of the dual part of the dual quaternion. Defaults to 0.
_dz Real The third component of the dual part of the dual quaternion. Defaults to 0.
_dw Real The fourth component of the dual part of the dual quaternion. Defaults to 0.

Properties

Name Description
Dual The dual part of the dual quaternion.
Real The real part of the dual quaternion.

Methods

Name Description
Add Adds dual quaternions and returns the result as a new dual quaternion.
Clone Creates a clone of the dual quaternion.
Conjugate Conjugates the dual quaternion and returns the result as a new dual quaternion.
Copy Copies components of the dual quaternion into other dual quaternion.
Dot Computes a dot product of two dual quaternions.
Exp Computes an exponential map of the dual quaternion and returns the result as a new dual quaternion.
FromArray Loads dual quaternion components (rX, rY, rZ, rW, dX, dY, dZ, dW) from an array.
FromBuffer Loads dual quaternion components (rX, rY, rZ, rW, dX, dY, dZ, dW) from a buffer.
FromRealDual Initializes the dual quaternion using real and dual part.
FromTranslationRotation Initializes the dual quaternion from translation and rotation (quaternion).
GetRotation Extracts rotation (quaternion) from dual quaternion.
GetTranslation Extracts translation (vec3) from dual quaternion.
Log Computes the logarithm map of the dual quaternion and returns the result as a new dual quaternion.
Mul Multiplies two dual quaternions and returns the result as a new dual quaternion.
Normalize Normalizes the dual quaternion and returns the result as a new dual quaternion.
Pow Computes the power of the dual quaternion raised to a real number and returns the result as a new dual quaternion.
Rotate Rotates a vector using the dual quaternion and returns the result as a new vector.
Scale Scales each component of the dual quaternion by a real value and returns the result as a new dual quaternion.
Sclerp Computes a screw linear interpolation of two dual quaternions and returns the result as a new dual quaternion.
ToArray Writes components (rX, rY, rZ, rW, dX, dY, dZ, dW) of the dual quaternion into an array.
ToBuffer Writes components (rX, rY, rZ, rW, dX, dY, dZ, dW) of the dual quaternion into a buffer.
ToMatrix Converts dual quaternion into a matrix.
Transform Translates and rotates a vector using the dual quaternion and returns the result as a new vector.

Note

If you leave all the arguments to their default values, an identity dual quaternion is created.

Do you find this page helpful?

Copyright © 2022, BlueBurn. Built on May 18, 2022 using GMDoc.