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>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <revolution/gx.h> 19 20void GXLoadNrmMtxIndx3x3( 21 u16 mtxIndx, 22 u32 id ); 23</pre></dd></dl> 24 25<h2>Arguments</h2> 26<TABLE class="arguments" border="1" > 27 <tr> 28<TH>mtxIndx</TH> 29<TD>Specifies the index to the array data in the main memory array.</TD> 30 </tr> 31 <tr> 32<TH>id</TH> 33<TD>Specifies the array name. Can specify a value enumerated in <CODE><A href="../Enumerated_Types/GXPosNrmMtx.html">GXPosNrmMtx</code></A>.</TD> 34 </tr> 35</TABLE> 36 37<h2>Return Values</h2> 38<p>None.</p> 39 40<H2>Description</H2> 41<P>This function will load a 3x3 normal matrix into matrix memory at location <SPAN class="argument">id</SPAN> based on a 3x3 matrix <SPAN class="argument">mtxPtr</SPAN> indicated by the index <SPAN class="argument">mtxIndx</SPAN> from the array in main memory set by the function indicated below.</P> 42<P><code><a href="../Geometry/GXSetArray.html">GXSetArray</a>(GX_NRM_MTX_ARRAY, ...);</code></P> 43<P>This matrix can either be made the current matrix (see the <A href="GXSetCurrentMtx.html"><CODE>GXSetCurrentMtx</CODE></A> function), or be used to transform normals in model space to view space by setting a matrix ID for each vertex (see the <A href="../Geometry/GXSetVtxDesc.html"><CODE>GXSetVtxDesc</CODE></A> function). The valid locations for <SPAN class="argument">id</SPAN> are enumerated in <CODE>GXPosNrmMtx</CODE>. The matrix will be loaded through the vertex cache.</P> 44<P>You can also load a position coordinate matrix (the <A href="GXLoadPosMtxImm.html"><CODE>GXLoadPosMtxImm</CODE></A> or <A href="GXLoadPosMtxIndx.html"><CODE>GXLoadPosMtxIndx</CODE></A> function) to the same <SPAN class="argument">id</SPAN>.</P> 45<P>To load a 3x3 matrix from an indexed 3x4 matrix in main memory, use the <CODE><a href="GXLoadNrmMtxImm.html">GXLoadNrmMtxImm</a></CODE> function.</P> 46<P><STRONG>Note:</STRONG>Be aware that the matrix is not coherent with the CPU cache because it is loaded directly from main memory into the matrix memory through the vertex cache. It's the application's responsibility to flush any matrix data from the CPU cache (see the <A href="../../os/Cache/DCStoreRange.html"><CODE>DCStoreRange</CODE></A> function) before calling this function.</P> 47 48<h2>See Also</h2> 49<p class="reference"> 50<a href="GXSetCurrentMtx.html">GXSetCurrentMtx</a>, 51<a href="GXLoadNrmMtxImm.html">GXLoadNrmMtxImm</a>, 52<a href="GXLoadPosMtxImm.html">GXLoadPosMtxImm</a>, 53<a href="GXLoadPosMtxIndx.html">GXLoadPosMtxIndx</a> 54</p> 55 56<h2>Revision History</h2> 57<P> 582008/05/12 Corrected a mistaken function name.<br>2006/03/01 Initial version.<br> 59</P> 60 61<hr><p>CONFIDENTIAL</p></body> 62</html>