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="Microsoft FrontPage 5.0">
7<META http-equiv="Content-Style-Type" content="text/css">
8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
9<title>GXLoadNrmMtxIndx3x3</title>
10</head>
11
12<body>
13
14<h1 align="left">GXLoadNrmMtxIndx3x3</h1>
15
16<h2>C Specification</h2>
17
18<dl>
19  <dd><pre><CODE>#include &lt;revolution/gx.h&gt;</CODE></pre></dd>
20  <dd><pre><CODE>void GXLoadNrmMtxIndx3x3(
21    u16     mtxIndx,
22    u32     id );</CODE></pre>
23  </dd>
24</dl>
25
26<h2>Arguments</h2>
27<TABLE border="1" cellpadding="3" cellspacing="0.1">
28  <tr>
29<TD width="120" valign="top" bgcolor="#ffffe8"><em><strong><CODE>mtxIndx</font></strong></em></TD>
30<TD width="520">Specifies the index to the matrix data in the main memory array.</TD>
31    </tr>
32  <tr>
33<TD width="120" valign="top" bgcolor="#ffffe8"><em><strong><CODE>id</font></strong></em></TD>
34<TD width="520">Specifies the matrix name.&nbsp;Can specify a value enumerated in <CODE><A href="../Enumerated_Types/GXPosNrmMtx.html">GXPosNrmMtx</A></code>.</TD>
35    </tr>
36</TABLE>
37<h2>Return Values</h2>
38
39<p>None.</p>
40<H2>Description</H2>
41<P>This function will load a 3x3 normal matrix into matrix memory at location <code><em><strong>id</strong></em></code> from a 3x3 matrix located at index <code><em><strong>mtxIndx</strong></em></code> from the array in main memory set by:</P>
42<P><code><a href="../Geometry/GXSetArray.html">GXSetArray</a>(GX_NRM_MTX_ARRAY, ...);</code></P>
43<P>This matrix can be used to transform normals in model space to view space, either by making the matrix the current one (see <a href="GXSetCurrentMtx.html"><code>GXSetCurrentMtx</code></a>), or by setting a matrix <code><em><strong>id</strong></em></code> for each vertex (see <a href="../Geometry/GXSetVtxDesc.html"><code>GXSetVtxDesc</code></a>).&nbsp;The valid locations for <em><strong><code>id</code></strong></em> are enumerated in <a href="../Enumerated_Types/GXPosNrmMtx.html"><code>GXPosNrmMtx</code></a>. The matrix will be loaded through the vertex cache.</P>
44<P>You can also load a position matrix (<a href="GXLoadPosMtxImm.html"><code>GXLoadPosMtxImm</code></a> or <a href="GXLoadPosMtxIndx.html"><code>GXLoadPosMtxIndx</code></a>) to the same <code><em><strong>id</strong></em></code>.</P>
45<P>You cannot use an indexed load to load a 3x3 matrix from an indexed 3x4 matrix in main memory.&nbsp;You must use <a href="GXLoadNrmMtxImm.html"><code>GXLoadNrmMtxImm</code></a> for this case.</P>
46<P><B>Note:</B> The matrix does not match the CPU's cache because it is loaded directly from main memory into the matrix memory through the vertex cache.&nbsp;It's the application's responsibility to flush any matrix data from the CPU cache (see <a href="../../os/Cache/DCStoreRange.html"><code>DCStoreRange</code></a>) before calling this function.</P>
47
48<h2>See Also</h2>
49
50<p><a href="GXSetCurrentMtx.html">GXSetCurrentMtx</a><br> <a href="GXLoadNrmMtxImm.html">GXLoadNrmMtxImm</a><br> <a href="GXLoadPosMtxImm.html">GXLoadPosMtxImm</a><br> <a href="GXLoadPosMtxIndx.html">GXLoadPosMtxIndx</a></p>
51
52<h2>Revision History</h2>
53<P>2006/03/01 Initial version</P></body></html>