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>lit-spot</title> 10</head> 11 12<body> 13 14<h1 align="left">lit-spot</h1> 15 16<h2>Description</h2> 17<p>This program tests spotlighting with angular attenuation control. A tessellated wall is lit by four lights used in one color channel. You can control the direction and angular attenuation of each light. Furthermore, the attenuation function can be switched on and off. 18</p> 19 20<h2>Coverage</h2> 21<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640"> 22 <tr> 23<TD width="30%" bgcolor="#C0C0C0"><em><strong>Functions</strong></em></TD> 24<TD width="25%" bgcolor="#C0C0C0"><em><strong>Parameters</strong></em></TD> 25<TD width="45%" bgcolor="#C0C0C0"><em><strong>Description</strong></em></TD> 26 </tr> 27 <tr> 28<TD width="30%" valign="top"><a href="../../../gx/Lighting/GXInitLightPos.html"><code>GXInitLightPos</code></a></TD> 29<TD width="25%"><SPAN class="argument">Position coordinate (x, y, z)</SPAN></TD> 30<TD width="45%">Various values.</TD> 31 </tr> 32 <tr> 33<TD width="30%" valign="top"><a href="../../../gx/Lighting/GXInitLightDir.html"><code>GXInitLightDir</code></a></TD> 34<TD width="25%"><SPAN class="argument">Light direction (nx, ny, nz)</SPAN></TD> 35<TD width="45%">Various values.</TD> 36 </tr> 37 <tr> 38<TD width="30%" valign="top"><a href="../../../gx/Lighting/GXInitLightColor.html"><code>GXInitLightColor</code></a></TD> 39<TD width="25%"><SPAN class="argument">Light color</SPAN></TD> 40<TD width="45%">Four colors.</TD> 41 </tr> 42 <tr> 43<TD width="30%" rowspan="2"><a href="../../../gx/Lighting/GXInitLightAttn.html"><code>GXInitLightAttn</code></a></TD> 44<TD width="25%"><SPAN class="argument">Angular attenuation coefficients</SPAN></TD> 45<TD width="45%"><strong>Appropriate value sets.</strong></TD> 46 </tr> 47 <tr> 48<TD width="25%"><SPAN class="argument">Distance attenuation coefficients</SPAN></TD> 49<TD width="45%">Fixed values: ( k0 = 1, k1 = 0, k2 = 0 ).</TD> 50 </tr> 51 <tr> 52<TD width="30%" valign="top"><a href="../../../gx/Lighting/GXLoadLightObjImm.html"><code>GXLoadLightObjImm</code></a></TD> 53<TD width="25%"><SPAN class="argument">Light ID</SPAN></TD> 54<TD width="45%"><CODE>GX_LIGHT0</CODE> to <CODE>GX_LIGHT3</CODE></TD> 55 </tr> 56 <tr> 57<TD width="30%" rowspan="7"><a href="../../../gx/Lighting/GXSetChanCtrl.html"><code>GXSetChanCtrl</code></a></TD> 58<TD width="25%"><SPAN class="argument">Color channel ID</SPAN></TD> 59<TD width="45%">Always <CODE>GX_COLOR0</CODE>.</TD> 60 </tr> 61 <tr> 62<TD width="25%"><SPAN class="argument">Channel enable</SPAN></TD> 63<TD width="45%">Always <CODE>GX_ENABLE</CODE>.</TD> 64 </tr> 65 <tr> 66<TD width="25%"><SPAN class="argument">Ambient color source</SPAN></TD> 67<TD width="45%">Always register source.</TD> 68 </tr> 69 <tr> 70<TD width="25%"><SPAN class="argument">Material color source</SPAN></TD> 71<TD width="45%">Always register source.</TD> 72 </tr> 73 <tr> 74<TD width="25%"><SPAN class="argument">Light mask</SPAN></TD> 75<TD width="45%">Some combinations.</TD> 76 </tr> 77 <tr> 78<TD width="25%"><SPAN class="argument">Diffusion function</SPAN></TD> 79<TD width="45%">Always <CODE>GX_DF_CLAMP</CODE>.</TD> 80 </tr> 81 <tr> 82<TD width="25%"><SPAN class="argument">Attenuation function</SPAN></TD> 83<TD width="45%"><strong><CODE>GX_AF_SPOT</CODE></strong> / <strong><CODE>GX_AF_NONE</CODE></strong></TD> 84 </tr> 85 <tr> 86<TD width="30%" height="38" rowspan="2"><a href="../../../gx/Lighting/GXSetChanAmbColor.html"><code>GXSetChanAmbColor</code></a></TD> 87<TD width="25%" height="19"><SPAN class="argument">Color channel ID</SPAN></TD> 88<TD width="45%" height="19">Only <CODE>GX_COLOR0A0</CODE>.</TD> 89 </tr> 90 <tr> 91<TD width="25%" height="19"><SPAN class="argument">Ambient color</SPAN></TD> 92<TD width="45%" height="19">Only one color.</TD> 93 </tr> 94 <tr> 95<TD width="30%" height="38" rowspan="2"><a href="../../../gx/Lighting/GXSetChanMatColor.html"><code>GXSetChanMatColor</code></a></TD> 96<TD width="25%" height="19"><SPAN class="argument">Color channel ID</SPAN></TD> 97<TD width="45%" height="19">Only <CODE>GX_COLOR0A0</CODE>.</TD> 98 </tr> 99 <tr> 100<TD width="25%" height="19"><SPAN class="argument">Material color</SPAN></TD> 101<TD width="45%" height="19">Only one color.</TD> 102 </tr> 103</TABLE> 104 105<h2>Using the Demo</h2> 106<P>START exits the test.</P> 107<P>The B button selects a light or camera (white light, red light, green light, blue light, camera mode). 108</P> 109<p> <strong><u>Light control mode</u></strong></p> 110<BLOCKQUOTE>The Control Stick controls the direction of the selected light.<BR>The C stick changes the x and y position of the selected light.<BR>The L and R buttons change the z position of selected light.<BR>The X and Y buttons change the spotlight shape (that is, the attenuation parameters) of the selected light.<BR>The A button hides the light position mark.</BLOCKQUOTE> 111 112<p> <u><strong>Camera control mode</strong></u></p> 113<BLOCKQUOTE>The Control stick moves the camera.<BR>The X button enables spotlight attenuation.<BR>The Y button disables spotlight attenuation.<BR>The L and R buttons change the wall shape.</BLOCKQUOTE> 114 115<h2>Snapshot</h2> 116<P><IMG src="./images/lit-spot.jpg" alt="lit-spot.jpg (7549 bytes)" width="480" height="360"></p> 117 118<h2>Required Data Files</h2> 119<p>None.</p> 120 121<H2>Revision History</H2> 122<P> 1232006/03/01 Initial version.<br> 124</P> 125 126<hr><p>CONFIDENTIAL</p></body> 127</html>