#include <revolution/mtx.h>
void C_MTXTranspose ( const Mtx src, Mtx xPose );
void PSMTXTranspose ( const Mtx src, Mtx xPose );
#define MTXTranspose C_MTXTranspose // for debug build
#define MTXTranspose PSMTXTranspose // for nondebug build
src |
Source matrix. src may be either an Mtx or an MtxPtr. src is unaffected unless src=xPose. |
xPose |
Transpose of source matrix with a fourth column of (0,0,0).xPose may be either an Mtx or an MtxPtr.src can be the same as xPose. |
None.
Copies the transpose of src into xPose. src is unaffected unless src=xPose. To transpose a 3x4 matrix, transpose the 3x3 rotation sub-matrix of src and set the fourth column to ( 0,0,0 ).
A transpose operation causes the original src translation term to be lost; however, this shouldn't be a problem because this function's intended usage is for the creation of inverse-transpose matrices for normal transformations. Since these are rotation matrices applied to vectors, a translation term is not required.
During a debug build, MTXTranspose is interpreted as C_MTXTranspose, which is a normal C language version. During a nondebug build for a Broadway processor, the paired-singles equivalent of this function, PSMTXTranspose, will be automatically substituted. You can also call C_MTXTranspose or SMTXTranspose explicitly.
The C version of this function becomes more efficient if src is not equal to xPose as it saves a copy operation from a temporary matrix.
03/01/2006 Initial version.