MTXTranspose

Syntax

#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

Arguments

src Source matrix. src may be either a Mtx or a MtxPtr. src is unaffected unless src = xPose.
xPose Transpose of source matrix with a fourth column of (0,0,0). xPose may be either a Mtx or a MtxPtr. OK if src = xPose

Return Values

None.

Description

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 loss of the original src translation term; however, this should not be a problem because this function's intended use 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 each of C_MTXTranspose/PSMTXTranspose explicitly.

The C version of this function becomes more efficient if src is not equal to xPose because that saves a copy operation from a temporary matrix.

See Also

Mtx, MtxPtr, MTXPushInvXpose

Revision History

2006/03/01 Initial version.


CONFIDENTIAL