Structures and Enums

Overview

Matrix uses doubles and arrays of doubles for all of its’ types.

The main type used is Trans_Matrix_typ, which is a double[4,4] that represents a transformation matrix.

A transformation matrix has a rotation matrix in the top left 3x3, translation in the rightmost 3x1, and the bottom row 1x4 = [0,0,0,1].

For ease of use, matrices are often represented as a Trans_Vector_typ where the Trans_Vector_typ is converted to a Trans_Matrix_typ based on the user selected Euler angle convention (ANGLE_TYPES).

Note

Each consecutive rotation in the ABC orientation representation will do a body rotation about the axis specified in ANGLE_TYPE.

Derived Types

The following types are used for clarity when operating on vectors and matrices.

Name Type Description
Trans_Matrix_typ double[4][4] Row major transformation matrix
Trans_Vector_typ double[6] XYZ translation and ABC Euler angles (deg.) of a transformation, ANGLE_TYPE is used to specify the order of rotations
Trans_Translation_typ double[3] XYZ translation
Trans_Orientation_typ double[3] ABC orientation as Euler angles

Structures

These structures are used for clarity when using sub-elements of vectors and matrices.

Element names separated by commas share the same type and description.

Trans_Vector_c_r_typ

Name Type Description
Offset Trans_Translation_typ XYZ translation
Rotation Trans_Orientation_typ ABC rotation, interpreted based on ANGLE_TYPE

Trans_Vector_c_typ

Name Type Description
X, Y, Z, A, B, C double A Trans_Vector_typ with each element directly accessible

Trans_Vector_j_typ

Name Type Description
Q1, Q2, Q3, Q4, Q5, Q6 double Series of joint values

Trans_Vector_j7_typ

Info

This structure is depreciated and should not be used.

Name Type Description
Q1, Q2, Q3, Q4, Q5, Q6 double Series of joint values

Trans_Translation_m_typ

Name Type Description
X, Y, Z double A Trans_Translation_typ with each element directly accessible

Trans_Orientation_m_typ

Name Type Description
A, B, C double A Trans_Orientation_typ with each element directly accessible

Enumerations

ANGLE_TYPES

Order of rotation for euler angles.

Name Value Description
CARDAN_XYZ 0
CARDAN_XZY_NO_IMPL 1
CARDAN_YXZ 2
CARDAN_YZX_NO_IMPL 3
CARDAN_ZXY 4
CARDAN_ZYX 5
CARDAN_XYX 6
CARDAN_XZX 7
CARDAN_YXY 8
CARDAN_YZY 9
CARDAN_ZXZ 10
CARDAN_ZYZ 11
CARDAN_NULL 24

Errors/Status

The Matrix library does not throw any specific error numbers currently.