pwu::Quaternion

Utility functions for quaternions, which are represented as a list of four real values (x, y, z, and angle).

Summary
pwu::QuaternionUtility functions for quaternions, which are represented as a list of four real values (x, y, z, and angle).
Static Actions
zeroReturn a quaternion that represents no rotation
setReturn a quaternion with the given axis and angle
axisGet the axis vector of a quaternion
angleGet the angle of a quaternion
equalCheck if two quaternions are equal
notEqualsCheck if two quaternions are not equal
rotateRotate one quaternion by another quaternion
inverseReturn the inverse of a quaternion
normalizeReturn the normalization of a quaternion

Static Actions

zero

pwu::Quaternion zero

Return a quaternion that represents no rotation

Parameters

none

Returns

a quaternion

set

pwu::Quaternion set axis angle

Return a quaternion with the given axis and angle

Parameters

axisthe axis of the quaternion
anglethe angle in degrees of the quaternion

Returns

a quaternion

axis

pwu::Quaternion axis quat

Get the axis vector of a quaternion

Parameters

quatthe quaternion

Returns

the axis vector

angle

pwu::Quaternion angle quat

Get the angle of a quaternion

Parameters

quatthe quaternion

Returns

the angle in degrees

equal

pwu::Quaternion equal quat1 quat2

Check if two quaternions are equal

Parameters

quat1the first quaternion
quat2the second quaternion

Returns

true if the quaternions are equal

notEquals

Check if two quaternions are not equal

Parameters

quat1the first quaternion
quat2the second quaternion

Returns

true if the quaternions are not equal

rotate

pwu::Quaternion rotate quat1 quat2

Rotate one quaternion by another quaternion

Parameters

quat1the first quaternion
quat2the second quaternion

Returns

the rotated quaternion

inverse

pwu::Quaternion inverse quat

Return the inverse of a quaternion

Parameters

quatthe quaternion

Returns

the normalized quaternion

normalize

pwu::Quaternion normalize quat

Return the normalization of a quaternion

Parameters

quatthe quaternion

Returns

the normalized quaternion

pwu::Quaternion zero
Return a quaternion that represents no rotation
pwu::Quaternion set axis angle
Return a quaternion with the given axis and angle
pwu::Quaternion axis quat
Get the axis vector of a quaternion
pwu::Quaternion angle quat
Get the angle of a quaternion
pwu::Quaternion equal quat1 quat2
Check if two quaternions are equal
pwu::Quaternion rotate quat1 quat2
Rotate one quaternion by another quaternion
pwu::Quaternion inverse quat
Return the inverse of a quaternion
pwu::Quaternion normalize quat
Return the normalization of a quaternion
Close