MTXInvXpose

Syntax

#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 a Mtx or a MtxPtr.
invX Result of transposing the inverse of the source matrix. src may be either a Mtx or a MtxPtr. It is okay if src=invX.

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 a given 3x4 matrix, which is equivalent to the result from the following operations.

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

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

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 each of C_MTXInvXpose/PSMTXInvXpose explicitly.

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

See Also

Mtx, MtxPtr, MTXInverse, MTXTranspose, MTXPushInvXpose

Revision History

2006/03/01 Initial version.


CONFIDENTIAL