1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<title>G3*_Translate</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">G3*_Translate <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></H1>
15<H2>Syntax</H2>
16
17<dl>
18  <dd>
19<PRE><CODE>#include &lt;nitro/gx/g3imm.h&gt;
20#include &lt;nitro/gx/g3b.h&gt;
21#include &lt;nitro/gx/g3c.h&gt;
22
23void G3_Translate(fx32 x, fx32 y, fx32 z);
24
25// Below are APIs for creating the display list (command list)<BR>void G3B_Translate(<A href="../gx/GXDLInfo.html">GXDLInfo</A>* info, fx32 x, fx32 y, fx32 z);<BR>void G3C_Translate(<A href="../gx/GXDLInfo.html">GXDLInfo</A>* info, fx32 x, fx32 y, fx32 z);<BR>void G3BS_Translate(<A href="../gx/GXDLInfo.html">GXDLInfo</A>* info, fx32 x, fx32 y, fx32 z);<BR>void G3CS_Translate(<A href="../gx/GXDLInfo.html">GXDLInfo</A>* info, fx32 x, fx32 y, fx32 z);</CODE></PRE>
26  </dd>
27</dl><h2>Arguments</h2>
28
29<table border="1" width="100%">
30  <tr>
31    <td width="13%"><em><strong><font face="Courier New">info</font></strong></em></td>
32    <td width="87%">Command List Information.</td>
33  </tr>
34  <tr>
35    <td width="13%"><em><strong><font face="Courier New">x</font></strong></em></td>
36    <td width="87%">Distance to move along x-axis</td>
37  </tr>
38    <TR>
39      <TD><em><strong><font face="Courier New">y</font></strong></em></TD>
40      <TD>Distance to move along y-axis</TD>
41    </TR>
42    <TR>
43      <TD><em><strong><font face="Courier New">z</font></strong></em></TD>
44      <TD>Distance to move along z-axis</TD>
45    </TR>
46  </table>
47<h2>Return Values</h2>
48<p>None.</p>
49<H2>Description</H2>
50<P>This function multiplies the current matrix on the left by the Parallel Translation matrix, as shown below. Each element of the matrix is a signed fixed-point number (sign + 19-bit integer + 12-bit decimal). If the current matrix is <code>C</code>, then the new matrix, <code>C<SUB>new</SUB></code>, is in the format shown below.</P>
51<P><span lang=EN-US style='font-size:10.5pt;mso-bidi-font-size: 12.0pt;font-family:Century;mso-fareast-font-family:"MS ??";mso-bidi-font-family: "Times New Roman";mso-font-kerning:1.0pt;mso-ansi-language:EN-US;mso-fareast-language: JA;mso-bidi-language:AR-SA'><span style='mso-text-raise:-33.0pt'><IMG width="153" height="96" src="geo_trans.gif" v:shapes="_x0000_i1025"></span></span></P>
52<P>The <CODE>G3OP_MTX_TRANS</CODE> command normally requires 22 cycles, and with the Position&amp;Vector mode it requires 52 cycles for an execute cycle. By grouping this with 3x3 matrix multiplication as follows, it is possible to process this more efficiently without using <CODE>G3OP_MTX_TRANS</CODE>. The same processing is done in the <CODE><A href="G3_MultTransMtx33.html">G3*_MultTransMtx33</A></CODE> function.</P>
53<PRE>struct {
54   MtxFx33  mtx;
55   VecFx32                 trans;
56} mtx43;</PRE>
57<PRE><A href="G3_MultMtx43.html" target="_self">G3*_MultMtx43</A>( (MtxFx43*)(&amp;mtx43) );
58</PRE>
59<h2>See Also</h2>
60<P><CODE><A href="G3_MtxMode.html" target="_self">G3*_MtxMode</A>, <A href="G3_Identity.html" target="_self">G3*_Identity</A>, <A href="G3_LoadMtx43.html" target="_self">G3*_LoadMtx43</A>, <A href="G3_LoadMtx44.html" target="_self">G3*_LoadMtx44</A>, <A href="G3_MultMtx43.html" target="_self">G3*_MultMtx43</A>, <A href="G3_MultMtx44.html" target="_self">G3*_MultMtx44</A>, <A href="G3_MultMtx33.html" target="_self">G3*_MultMtx33</A>, <A href="G3_MultTransMtx33.html" target="_self">G3*_MultTransMtx33</A>, <A href="G3_PushMtx.html" target="_self">G3*_PushMtx</A>, <A href="G3_PopMtx.html" target="_self">G3*_PopMtx</A>, <A href="G3_StoreMtx.html" target="_self">G3*_StoreMtx</A>, <A href="G3_RestoreMtx.html" target="_self">G3*_RestoreMtx</A>, <A href="G3_Scale.html" target="_self">G3*_Scale</A>, <a href="G3_MultTransMtx33.html" target="_self">G3*_MultTransMtx33</a></CODE></P>
61<H2>Revision History</H2>
62<P>2004/07/26 Added description on boosting speed by packing with the 3x3 matrix multiplication.<BR>2004/01/19 Initial version.</P>
63<hr><p>CONFIDENTIAL</p></body>
64</html>
65