1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META http-equiv="Content-Style-Type" content="text/css">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<TITLE>GDSetCurrentMtx</TITLE>
9</HEAD>
10<BODY>
11<H1 align="left">GDSetCurrentMtx</H1>
12
13<H2>Syntax</H2>
14<dl><dd><pre class="construction">
15#include &lt;revolution/gd.h&gt;
16
17void GDSetCurrentMtx ( u32 pn, u32 t0, u32 t1, u32 t2, u32 t3,
18                       u32 t4, u32 t5, u32 t6, u32 t7 );
19</pre></dd></dl>
20
21<H2>Arguments</H2>
22<TABLE class="arguments" border="1" >
23  <TBODY>
24    <TR>
25<TH><STRONG><EM><CODE>pn</CODE></EM></STRONG></TH>
26<TD>Specifies the matrix <a href="../gx/Enumerated_Types/GXPosNrmMtx.html">index</a> to use for the position/normal matrix.</TD>
27    </TR>
28    <TR>
29<TH><STRONG><EM><CODE>t0</CODE></EM></STRONG></TH>
30<TD>Specifies the matrix <a href="../gx/Enumerated_Types/GXTexMtx.html">index</a> to use for texture coordinate 0.</TD>
31    </TR>
32    <TR>
33<TH>t1</TH>
34<TD>Specifies the matrix <a href="../gx/Enumerated_Types/GXTexMtx.html">index</a> to use for texture coordinate 1.</TD>
35    </TR>
36    <TR>
37<TH>t2</TH>
38<TD>Specifies the matrix <a href="../gx/Enumerated_Types/GXTexMtx.html">index</a> to use for texture coordinate 2.</TD>
39    </TR>
40    <TR>
41<TH><STRONG><EM><CODE>t3</CODE></EM></STRONG></TH>
42<TD>Specifies the matrix <a href="../gx/Enumerated_Types/GXTexMtx.html">index</a> to use for texture coordinate 3.</TD>
43    </TR>
44    <TR>
45<TH><STRONG><EM><CODE>t4</CODE></EM></STRONG></TH>
46<TD>Specifies the matrix <a href="../gx/Enumerated_Types/GXTexMtx.html">index</a> to use for texture coordinate 4.</TD>
47    </TR>
48    <TR>
49<TH><STRONG><EM><CODE>t5</CODE></EM></STRONG></TH>
50<TD>Specifies the matrix <a href="../gx/Enumerated_Types/GXTexMtx.html">index</a> to use for texture coordinate 5.</TD>
51    </TR>
52    <TR>
53<TH><STRONG><EM><CODE>t6</CODE></EM></STRONG></TH>
54<TD>Specifies the matrix <a href="../gx/Enumerated_Types/GXTexMtx.html">index</a> to use for texture coordinate 6.</TD>
55    </TR>
56    <TR>
57<TH><STRONG><EM><CODE>t7</CODE></EM></STRONG></TH>
58<TD>Specifies the matrix <a href="../gx/Enumerated_Types/GXTexMtx.html">index</a> to use for texture coordinate 7.</TD>
59    </TR>
60  </TBODY>
61</TABLE>
62
63<H2>Return Values</H2>
64<P>None.</P>
65
66<H2>Description</H2>
67<P>This&nbsp;function sets the current matrix parameters for both the position/normal matrix as well as all of the texture coordinate transformation matrices.&nbsp;</P>
68<P>The matrix <SPAN class="argument">pn</SPAN> is used to select the current modelview transform matrix and normal transform matrix, as long as a position coordinate matrix or normal matrix index is not present in the vertex data (see <A href="../gx/Geometry/GXSetVtxDesc.html"><CODE>GXSetVtxDesc</CODE></A>). If <CODE>GX_VA_PNMTXIDX</CODE> is enabled by the current vertex descriptor, the matrix <SPAN class="argument">pn</SPAN> specified by the <code>GDSetCurrentMtx</code> function will be overwritten by the indices specified as vertices.</P>
69<P>Similarly, if the vertex data does not have a texture matrix index that corresponds to each vertex, matrices <SPAN class="argument">t0</SPAN> - <SPAN class="argument">t7</SPAN> will be used to select the current texture coordinate transformation matrix for texture coordinates 0 - 7, respectively. A vertex level texture matrix index will overwrite the corresponding matrix specified by <code>GDSetCurrentMtx</code>.</P>
70<P>Values enumerated by <a href="../gx/Enumerated_Types/GXPosNrmMtx.html"><code>GXPosNrmMtx</code></a> are specified for the given position coordinate matrix index/normal matrix index. Values enumerated by <a href="../gx/Enumerated_Types/GXTexMtx.html">GXTexMtx</a> are specified for the given texture matrix index. <a href="../gx/Management/GXInit.html"><code>GXInit</code></a> function sets <code>GX_PNMTX0</code> as the default position coordinate index/normal matrix and </CODE>GX_IDENTITY </CODE> as the default texture coordinate transform matrix for all of the texture coordinates.</P>
71<P>Note that matrix indices correspond to rows in matrix memory. While the position matrix memory has 64 rows (shared with regular texture matrices), the normal matrix memory has only 32 rows.&nbsp;Position coordinate matrix rows beyond the first 32 rows will wrap around to reference the corresponding normal matrix rows.&nbsp;Therefore, a position coordinate and normal matrix index value of 48 indicates row 48 in the position matrix memory and row 16 in the normal matrix memory.</P>
72
73<H2>See Also</H2>
74<P class="reference">
75<A href="../gx/Transform/GXSetCurrentMtx.html">GXSetCurrentMtx</A>,
76<A href="../gx/TexCoordGen/GXSetTexCoordGen.html">GXSetTexCoordGen</A>,
77<A href="../gx/Transform/GXLoadNrmMtxImm.html">GXLoadNrmMtxImm</A>,
78<A href="../gx/Transform/GXLoadNrmMtxIndx3x3.html">GXLoadNrmMtxIndx3x3</A>,
79<A href="../gx/Transform/GXLoadPosMtxImm.html">GXLoadPosMtxImm</A>,
80<A href="../gx/Transform/GXLoadPosMtxIndx.html">GXLoadPosMtxIndx</A>,
81<A href="../gx/Transform/GXLoadTexMtxImm.html">GXLoadTexMtxImm</A>,
82<A href="../gx/Transform/GXLoadTexMtxIndx.html">GXLoadTexMtxIndx</A></P>
83<P>(and corresponding <a href="gdgx.html">GD</a> functions)</P>
84
85<H2>Revision History</H2>
86<P>
872006/03/01 Initial version.<BR>
88</P>
89
90<hr><p>CONFIDENTIAL</p></body>
91</HTML>