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_Normal</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">G3*_Normal <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> 20#include <nitro/gx/g3imm.h> 21#include <nitro/gx/g3b.h> 22#include <nitro/gx/g3c.h> 23 24void G3_Normal(fx16 x, fx16 y, fx16 z); 25 26// Below are APIs for creating the display list (command list)<BR>void G3B_Normal(<A href="../gx/GXDLInfo.html">GXDLInfo</A>* info, fx16 x, fx16 y, fx16 z);<BR>void G3C_Normal(<A href="../gx/GXDLInfo.html">GXDLInfo</A>* info, fx16 x, fx16 y, fx16 z);<BR>void G3BS_Normal(<A href="../gx/GXDLInfo.html">GXDLInfo</A>* info, fx16 x, fx16 y, fx16 z);<BR>void G3CS_Normal(<A href="../gx/GXDLInfo.html">GXDLInfo</A>* info, fx16 x, fx16 y, fx16 z);</CODE></PRE> 27 </dd> 28</dl><h2>Arguments</h2> 29 30<table border="1" width="100%"> 31 <tr> 32 <td width="13%"><em><strong><font face="Courier New">info</font></strong></em></td> 33 <td width="87%">Command List Information.</td> 34 </tr> 35 <tr> 36 <td width="13%"><em><strong><font face="Courier New">x</font></strong></em></td> 37 <td width="87%">x-component of the normal vector</td> 38 </tr> 39 <TR> 40 <TD><em><strong><font face="Courier New">y</font></strong></em></TD> 41 <TD>y-component of the normal vector</TD> 42 </TR> 43 <TR> 44 <TD><em><strong><font face="Courier New">z</font></strong></em></TD> 45 <TD>z-component of the normal vector</TD> 46 </TR> 47 </table> 48<h2>Return Values</h2> 49<p>None.</p> 50<H2>Description</H2> 51<P>This function sets the normal vector. The <em><strong><code>x</code></strong></em>, <em><strong><code>y</code></strong></em>, and <em><strong><code>z</code></strong></em> arguments can take values of more than or equal to -<code>FX16_ONE</code> and less than or equal to <code>FX16_ONE</code> - 1. Because the format is changed internally to fixed point decimal (sign + 9-bit decimal), the value is passed to the hardware as more than -1.0 (<code>0xF000</code>) and less than 0.998 (<code>0x0FF9</code>). Because vector normalization is not performed by the hardware, be sure to set a normalized vector.<BR><BR>The vertex color requested by the lighting is valid until the current vertex color is updated by the <code><A href="G3_Color.html" target="_self">G3*_Color</A></code>, <code><A href="G3_Normal.html" target="_self">G3*_Normal</A></code>, or <code><A href="G3_MaterialColorDiffAmb.html" target="_self">G3*_MaterialColorDiffAmb</A></code> (vertex color set flag) command. For this reason, normal vectors can be shared by multiple vertices during actual use. Lighting only occurs when the <code>Normal</code> command is executed. Accordingly, to reflect the results in the vertex color caused by turning lighting ON or OFF or changing the material parameters, the <code>Normal</code> command must be executed again.</P> 52<h2>See Also</h2> 53<P><code><A href="G3_Color.html">G3*_Color</A>, <A href="G3_MaterialColorDiffAmb.html" target="_self">G3*_MaterialColorDiffAmb</A></code></P> 54<H2>Revision History</H2> 55<P>2004/01/19 Initial version.</P> 56<hr><p>CONFIDENTIAL</p></body> 57</html> 58