CompMatrix

Performs composite coordinate transformation

MATRIX* CompMatrix (
        MATRIX* m0,
        MATRIX* m1,
        MATRIX* m2
)

Arguments

m0 Pointer to input matrix
m1 Pointer to input matrix
m2 Pointer to result matrix

Return Value

The result matrix m2 is returned.

Explanation

The composite coordinate transformation of matrix m0 and matrix m1 (including translation) is performed.
The result is placed in matrix m2.
The following algorithm is used.
        [m2->m] = [m0->m] * [m1->m]
        (m2->t) = [m0->m] * (m1->t) + (m0->t)
However the values of the m1->t elements must be within the range of [-215,215).

The argument format is as follows::
    m0->m[i][j] : (1,3,12)
    m0->t[i] : (1,31,0)
    m1->m[i][j] : (1,3,12)
    m1->t[i] : (1,15,0)
    m2->m[i][j] : (1,3,12)
    m2->t[i]: (1,31,0)

Notes

This function destroys the rotation matrix.