RotationAxisAngles

RotationAxisAngles#

Class template to calculate Bryant (euler) angles for the z-y-x rotation sequence given a a rotation matrix.

Listing 9 Include this file this file to use#
#include "<AMMR_TOOLS>\AnyMocap/RotationAxisAngles.any"`

#RotAxisAnglesZYX#

Calculates the Bryant (euler) angles for the z-y-x rotation sequence given a rotation matrix

Example

Here is an example of how to use the class.

 RotAxisAnglesZYX Angles(ROT = .SomeSeg.Axes0) = {};

 // Results are in radians
 AnyVar zRot = Angles.zRot;
 AnyVar yRot = Angles.yRot;
 AnyVar xRot = Angles.xRot;

The class can also calculate the relative rotation angles between two segments.

RotAxisAnglesZYX Angles(ROT = .SomeSeg.Axes0) = {
  ROT_rel = .SomeOtherSeg.Axes0;
};

Full signature

RotAxisAnglesZYX <ObjectName>(
  ROT=<required>,
) = {};

Arguments

__CLASS__:

AnyFolder

ROT:

The rotation matrix to calculate the angles from (Required)

Optional initialization members

ROT_rel = eye(3);
class type:

AnyMat33

A relative rotation matrix so the angles are calculated between these two rotation matrices.