MTXTransApply

C Specification

#include <revolution/mtx.h>
void C_MTXTransApply ( const Mtx src, Mtx dst, f32 xT, f32 yT, f32 zT );
void PSMTXTransApply ( Mtx src, Mtx dst, f32 xT, f32 yT, f32 zT );

#define MTXTransApply  C_MTXTransApply // for debug build
#define MTXTransApply  PSMTXTransApply // for nondebug build

Arguments

src Source matrix.  src may be either an Mtx or an MtxPtr.
dst Result of translating the source matrix. dst may be either an Mtx or an MtxPtr.
xT X translation value.
yT Y translation value.
zT Z translation value.

Return Values

None.

Description

Applies translation specified by three ( xT, yT, zT ) parameters to src and places the result in dst. This function performs the same operation as the following:

    Mtx tr;
    MTXTrans(tr, xT, yT, zT);
    MTXConcat(tr, src, dst);

Since the use of this function (MTXTransApply) can reduce unnecessary calculations, it can get better performance than using the combination of the two functions MTXTrans and MTXConcat shown above.

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

See Also

Mtx, MtxPtr, MTXTrans, MTXConcat

Revision History

03/01/2006 Initial version.