Houdini 20.0 Nodes APEX Nodes

quaternion::SwingTwistDecompose<T>

Decomposes a quaternion into a twist along an axis and a swing.

On this page
Since 20.0

By default, the decomposition will be Q = Swing * Twist. If type T is Float, the twist will be a Float value which represents rotation around the axis in radians, else the twist will be a quaternion representing the rotation around the axis.

Inputs

quaternion: Vector4

Vector4 representing the input quaternion.

axis: Vector3

Vector3 representing the axis of the decomposition

reverse: Bool

If true, the decomposition will be Q = Twist * Swing

Outputs

swing: Vector4

Quaternion representing the swing part of the decomposition

twist: Float, Vector4

Quaternion/Float representing the twisting part of the decomposition along the axis.

APEX Nodes