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>GXLoadNrmMtxImm</title> 10</head> 11 12<body> 13 14<h1 align="left">GXLoadNrmMtxImm</h1> 15 16<h2>C Specification</h2> 17 18<dl> 19<dd><pre><CODE>#include <revolution/gx.h></CODE></pre> 20 </dd> 21<dd><pre><CODE>void GXLoadNrmMtxImm( 22const f32 mtxPtr[3][4], 23u32 <A href="../Enumerated_Types/GXPosNrmMtx.html">id</A> );</CODE></pre> 24 </dd> 25</dl> 26 27<h2>Arguments</h2> 28<TABLE border="1" cellpadding="3" cellspacing="0.1"> 29 <tr> 30<TD width="120" valign="top" bgcolor="#ffffe8"><em><strong><CODE>mtxPtr</font></strong></em></TD> 31<TD width="520">Specifies a pointer to the matrix data</TD> 32 </tr> 33 <tr> 34<TD width="120" valign="top" bgcolor="#ffffe8"><em><strong><CODE>id</font></strong></em></TD> 35<TD width="520">Specifies the matrix name Can specify a value enumerated in <CODE><A href="../Enumerated_Types/GXPosNrmMtx.html">GXPosNrmMtx</A></CODE></TD> 36 </tr> 37</TABLE> 38<h2>Return Values</h2> 39 40<p>None</p> 41<H2>Description</H2> 42<P>This function is used to load a 3x3 normal transform matrix into matrix memory at location <em><strong><code>id</code></strong></em> from the 3x4 matrix <em><strong><code>mtxPtr</code></strong></em>. This matrix is used to transform normals in model space to view space, either by making it the current matrix (see <a href="GXSetCurrentMtx.html"><code>GXSetCurrentMtx</code></a>), or by setting a matrix <code><em><strong>id</strong></em></code> for each vertex. The translation terms in the 3x4 matrix are not needed for normal rotation and are ignored during the load. The argument <code><em><strong>id</strong></em></code> enumerated in <a href="../Enumerated_Types/GXPosNrmMtx.html"><code>GXPosNrmMtx</code></a> points to the load destination matrix location in the matrix memory. </P> 43<P>You can also load a position coordinate matrix (<a href="GXLoadPosMtxImm.html"><code>GXLoadPosMtxImm</code></a>) to the same <code><em><strong>id</strong></em></code>. Usually, the normal matrix will be the inverse transpose of the position (modelview) matrix and is used during <a href="../toc.html#Lighting">vertex lighting</a>. In cases where the modelview and the inverse transpose of the modelview matrix (excluding translation) are the same, the same matrix can be loaded for both normal and position matrices.</P> 44<P>To load a normal matrix from a 3x3 matrix, use <a href="GXLoadNrmMtxImm3x3.html"><code>GXLoadNrmMtxImm3x3</code></a>.</P> 45<P>The matrix data is copied from main memory or the CPU cache into the graphics FIFO, so matrices loaded using this function are always coherent with the CPU cache.</P> 46 47<h2>See Also</h2> 48 49<p><a href="GXSetCurrentMtx.html">GXSetCurrentMtx</a><br> <a href="GXLoadPosMtxImm.html">GXLoadPosMtxImm</a></p> 50<H2>Revision History</H2> 51<P>03/01/2006 Initial version.</P> 52</BODY> 53</HTML>