MTXInvXpose

C Specification

#include <revolution/mtx.h>
u32 C_MTXInvXpose ( const Mtx src, Mtx invX );
u32 PSMTXInvXpose ( const Mtx src, Mtx invX );
#define MTXInvXpose  C_MTXInvXpose // for debug build
#define MTXInvXpose  PSMTXInvXpose // for nondebug build

Arguments

src Matrix to be inverted and transposed. src may be either an Mtx or an MtxPtr.
invX Result of transposing the inverse of the source matrix. src may be either an Mtx or an MtxPtr. Acceptable if src=inv.

Return Values

Returns 0 if the specified matrix has no inverse. invX is not changed in this case.

Returns 1 when successful.

Description

This function computes inverse-transpose of given 3x4 matrix which is equivalent to the result from following operations.

    Mtx inv;
    MTXInverse( src, inv );
    MTXTranspose( inv, invX );

The operation is common for computing normal transform matrices from position transform matrices. Since the use of this function can reduce unnecessary calculations, the performance is better than using combination of two functions above.

During a debug build, MTXInvXpose is interpreted as C_MTXInvXpose, which is a normal C language version. During a nondebug build for a Broadway processor, the paired-singles equivalent of this function, PSMTXInvXpose, will be automatically substituted. You can also call C_MTXInvXpose or PSMTXInvXpose explicitly.

The C version of this function becomes more efficient if src is not equal to invX as it saves a copy operation from a temporary matrix.

See Also

Mtx, MtxPtr, MTXInverse, MTXTranspose, MTXPushInvXpose

Revision History

03/01/2006 Initial version.