NNS_G2dSetTrans

Syntax

#include <nnsys/g2d/g2d_Renderer.h>
void NNS_G2dSetTrans(fx32 x, fx32 y, fx32 z );
  

Arguments

x [IN] X-translation
y [IN] Y-translation
z [IN] Z-translation

Return Values

None.

Description

Configures the translation component of the current matrix inside the renderer. An increase in processing efficiency can be anticipated if it is possible to avoid using the Push and Pop operations of the matrix stack.

Code Example:
//------------------------------------------
// When using NNS_G2dTranslate
for( i = 0;i < N; i++ )
{
    NNS_G2dPushMtx();
        NNS_G2dTranslate( gameObjs[i].pos.x,
                          gameObjs[i].pos.y,
                          gameObjs[i].pos.z );
        NNS_G2dDrawCell( gameObjs[i].pCell );
    NNS_G2dPopMtx(1);
}
//------------------------------------------
// When using NNS_G2dSetTrans
for( i = 0;i < N; i++ )
{
    // NNS_G2dPushMtx();// Unnecessary
        NNS_G2dSetTrans( gameObjs[i].pos.x,
                         gameObjs[i].pos.y,
                         gameObjs[i].pos.z );
        NNS_G2dDrawCell( gameObjs[i].pCell );
    // NNS_G2dPopMtx(1);// Unnecessary
}

See Also

NNS_G2dTranslate
NNS_G2dRotZ
NNS_G2dScale

Revision History

2004/11/10 Initial version.


CONFIDENTIAL