MAL.TransposeTM

Previous  Next

 

ref_TM_out = MAL.TransposeTM( [BYREF TM_out       AS ARRAY],

                               BYREF TM_in        AS ARRAY,

                              [BYVAL nFrameOffset AS INTEGER=0] ) AS REFERENCE

 


 

Returns the transposed 3x3 transformation matrix.  The input matrix can be either

 

DIM tm( 3, 3 ) AS REAL

 

or

 

DIM tm( nFrames, 3, 3 ) AS REAL

 

In the first case, the frame offset will always be ignored

 

Example:

 

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

' Create the output TM

'

DIM TM_Out( nFrames, 3, 3 ) AS REAL

 

' Using V3D to create the 3 3D arrays

MAL.CreateTM( TM_Out,_

             V3D( Position, 1 ),_

             V3D( Position, 2 ),_

             V3D( Position, 3 ) )

CALL PrintArray( REF( TM_Out ) )

 

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

' Transpose

'

DIM TM_Transposed( nFrames, 3, 3 ) AS REAL

 

MAL.TransposeTM( TM_Transposed, TM_Out )

CALL PrintArray( REF( TM_Transposed ) )

 

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

' Normalize

'

DIM TM_Normalized( nFrames, 3, 3 ) AS REAL

 

MAL.NormalizeTM( TM_Normalized, TM_Out )

CALL PrintArray( REF( TM_Normalized ) )