1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../../../../css/manpage.css" type="text/css" />
7    <style type="text/css"><!--
8      span.static_style
9      {
10        font-size			: 8pt;
11        color				: white;
12        font-weight			: bold;
13        background			: #44f;
14        border-left			: solid 1px #aaf;
15        border-top			: solid 1px #aaf;
16        border-right		: solid 1px #00c;
17        border-bottom		: solid 1px #00c;
18        padding-left		: 2px;
19        padding-right		: 2px;
20      }
21
22      span.virtual_style
23      {
24        font-size			 : 8pt;
25        color				 : white;
26        font-weight			: bold;
27        background			: #0a0;
28        border-left			: solid 1px #0f0;
29        border-top			: solid 1px #0f0;
30        border-right		: solid 1px #060;
31        border-bottom		: solid 1px #060;
32        padding-left		: 2px;
33        padding-right		: 2px;
34      }
35
36      span.protected_style
37      {
38        font-size			 : 8pt;
39        color				 : white;
40        font-weight			: bold;
41        background			: #444;
42        border-left			: solid 1px #ccc;
43        border-top			: solid 1px #ccc;
44        border-right		: solid 1px #222;
45        border-bottom		: solid 1px #222;
46        padding-left		: 2px;
47        padding-right		: 2px;
48      }
49        --></style>
50<title>nn::gr::CTR::FragmentLight::Source</title>
51  </head>
52  <body>
53<h1><CODE><a href="../../../../../nn/Overview.html">nn</a>::<a href="../../../../../nn/gr/Overview.html">gr</a>::<a href="../../../../../nn/gr/CTR/Overview.html">CTR</a>::<a href="../../../../../nn/gr/CTR/FragmentLight/Overview.html">FragmentLight</a>::Source</CODE> Class</h1>
54<h2>Syntax</h2>
55    <div class="section">
56      <pre class="definition">class Source</pre>
57    </div>
58<h2>Description</h2>
59    <div class="section">
60<p>Class for making settings per light source.</p><!-- write here --></div>
61    <a name="variable" id="variable">
62<h2>Member Variables</h2>
63      <div class="section">
64        <table class="members">
65          <tr>
66            <td width="100"> </td>
67            <th>
68<span class="argument">id</span>
69            </th>
70<td width="100"><a href="../../../../../nn_types/u8.html">u8</a></td>
71<td>The light source number. Type is <CODE>u8</CODE>. Set a value between 0 and -7.</td>
72          </tr>
73          <tr>
74            <td width="100"> </td>
75            <th>
76<span class="argument">isEnableTwoSideDiffuse</span>
77            </th>
78<td width="100">bool</td>
79<td>Light can be made to strike both sides by setting this to <CODE>true</CODE>. Type is <CODE>bool</CODE>.</td>
80          </tr>
81          <tr>
82            <td width="100"> </td>
83            <th>
84<span class="argument">isEnableGeomFactor0</span>
85            </th>
86<td width="100">bool</td>
87<td>Sets whether to use geometric factor 0. Type is <CODE>bool</CODE>.</td>
88          </tr>
89          <tr>
90            <td width="100"> </td>
91            <th>
92<span class="argument">isEnableGeomFactor1</span>
93            </th>
94<td width="100">bool</td>
95<td>Sets whether to use geometric factor 1. Type is <CODE>bool</CODE>.</td>
96          </tr>
97          <tr>
98            <td width="100"> </td>
99            <th>
100<span class="argument">diffuseR</span>
101            </th>
102<td width="100"><a href="../../../../../nn_types/u8.html">u8</a></td>
103<td>Red component setting for diffuse light.     Type is <CODE>u8</CODE>. The product of <CODE>dmp_FragmentMaterial.diffuse</CODE> and <CODE>dmp_FragmentLightSource[i].diffuse</CODE> is set after it has been mapped from a value between <CODE>0.0f</CODE> and <CODE>1.0f</CODE> to a value between <CODE>0</CODE> and <CODE>255</CODE>.</td>
104          </tr>
105          <tr>
106            <td width="100"> </td>
107            <th>
108<span class="argument">diffuseG</span>
109            </th>
110<td width="100"><a href="../../../../../nn_types/u8.html">u8</a></td>
111<td>Green component setting for diffuse light. Type is <CODE>u8</CODE>. The product of <CODE>dmp_FragmentMaterial.diffuse</CODE> and <CODE>dmp_FragmentLightSource[i].diffuse</CODE> is set after it has been mapped from a value between <CODE>0.0f</CODE> and <CODE>1.0f</CODE> to a value between <CODE>0</CODE> and <CODE>255</CODE>.</td>
112          </tr>
113          <tr>
114            <td width="100"> </td>
115            <th>
116<span class="argument">diffuseB</span>
117            </th>
118<td width="100"><a href="../../../../../nn_types/u8.html">u8</a></td>
119<td>Blue component setting for diffuse light.     Type is <CODE>u8</CODE>. The product of <CODE>dmp_FragmentMaterial.diffuse</CODE> and <CODE>dmp_FragmentLightSource[i].diffuse</CODE> is set after it has been mapped from a value between <CODE>0.0f</CODE> and <CODE>1.0f</CODE> to a value between <CODE>0</CODE> and <CODE>255</CODE>.</td>
120          </tr>
121          <tr>
122            <td width="100"> </td>
123            <th>
124<span class="argument">ambientR</span>
125            </th>
126<td width="100"><a href="../../../../../nn_types/u8.html">u8</a></td>
127<td>Red component setting for ambient light. Type is <CODE>u8</CODE>. The product of <CODE>dmp_FragmentMaterial.ambient</CODE> and <CODE>dmp_FragmentLightSource[i].ambient</CODE> is set after it has been mapped from a value between <CODE>0.0f</CODE> and <CODE>1.0f</CODE> to a value between <CODE>0</CODE> and <CODE>255</CODE>.</td>
128          </tr>
129          <tr>
130            <td width="100"> </td>
131            <th>
132<span class="argument">ambientG</span>
133            </th>
134<td width="100"><a href="../../../../../nn_types/u8.html">u8</a></td>
135<td>Green component setting for ambient light. Type is <CODE>u8</CODE>. The product of <CODE>dmp_FragmentMaterial.ambient</CODE> and <CODE>dmp_FragmentLightSource[i].ambient</CODE> is set after it has been mapped from a value between <CODE>0.0f</CODE> and <CODE>1.0f</CODE> to a value between <CODE>0</CODE> and <CODE>255</CODE>.</td>
136          </tr>
137          <tr>
138            <td width="100"> </td>
139            <th>
140<span class="argument">ambientB</span>
141            </th>
142<td width="100"><a href="../../../../../nn_types/u8.html">u8</a></td>
143<td>Blue component setting for ambient light. Type is <CODE>u8</CODE>. The product of <CODE>dmp_FragmentMaterial.ambient</CODE> and <CODE>dmp_FragmentLightSource[i].ambient</CODE> is set after it has been mapped from a value between <CODE>0.0f</CODE> and <CODE>1.0f</CODE> to a value between <CODE>0</CODE> and <CODE>255</CODE>.</td>
144          </tr>
145          <tr>
146            <td width="100"> </td>
147            <th>
148<span class="argument">specular0R</span>
149            </th>
150<td width="100"><a href="../../../../../nn_types/u8.html">u8</a></td>
151<td>Red component setting for specular light. Type is <CODE>u8</CODE>. The product of <CODE>dmp_FragmentMaterial.specular0</CODE> and <CODE>dmp_FragmentLightSource[i].specular0</CODE> is set after it has been mapped from a value between <CODE>0.0f</CODE> and <CODE>1.0f</CODE> to a value between <CODE>0</CODE> and <CODE>255</CODE>.</td>
152          </tr>
153          <tr>
154            <td width="100"> </td>
155            <th>
156<span class="argument">specular0G</span>
157            </th>
158<td width="100"><a href="../../../../../nn_types/u8.html">u8</a></td>
159<td>Green component setting for specular light. Type is <CODE>u8</CODE>. The product of <CODE>dmp_FragmentMaterial.specular0</CODE> and <CODE>dmp_FragmentLightSource[i].specular0</CODE> is set after it has been mapped from a value between <CODE>0.0f</CODE> and <CODE>1.0f</CODE> to a value between <CODE>0</CODE> and <CODE>255</CODE>.</td>
160          </tr>
161          <tr>
162            <td width="100"> </td>
163            <th>
164<span class="argument">specular0B</span>
165            </th>
166<td width="100"><a href="../../../../../nn_types/u8.html">u8</a></td>
167<td>Blue component setting for specular light. Type is <CODE>u8</CODE>. The product of <CODE>dmp_FragmentMaterial.specular0</CODE> and <CODE>dmp_FragmentLightSource[i].specular0</CODE> is set after it has been mapped from a value between <CODE>0.0f</CODE> and <CODE>1.0f</CODE> to a value between <CODE>0</CODE> and <CODE>255</CODE>.</td>
168          </tr>
169          <tr>
170            <td width="100"> </td>
171            <th>
172<span class="argument">specular1R</span>
173            </th>
174<td width="100"><a href="../../../../../nn_types/u8.html">u8</a></td>
175<td>Red component setting for specular 1. Type is <CODE>u8</CODE>. Either <CODE>dmp_FragmentLightSource[i].specular1</CODE> is set or the product of <CODE>dmp_FragmentMaterial.specular1</CODE> and <CODE>dmp_FragmentLightSource[i].specular1</CODE> is set depending on whether <CODE>true</CODE> or <CODE>false</CODE>, respectively, is specified to <CODE>Light::isEnableLutRefl</CODE>. Each setting is first mapped from a value between <CODE>0.0f</CODE> and <CODE>1.0f</CODE> to a value between <CODE>0</CODE> and <CODE>255</CODE>.</td>
176          </tr>
177          <tr>
178            <td width="100"> </td>
179            <th>
180<span class="argument">specular1G</span>
181            </th>
182<td width="100"><a href="../../../../../nn_types/u8.html">u8</a></td>
183<td>Green component setting for specular 1. Type is <CODE>u8</CODE>. Either <CODE>dmp_FragmentLightSource[i].specular1</CODE> is set or the product of <CODE>dmp_FragmentMaterial.specular1</CODE> and <CODE>dmp_FragmentLightSource[i].specular1</CODE> is set depending on whether <CODE>true</CODE> or <CODE>false</CODE>, respectively, is specified to <CODE>Light::isEnableLutRefl</CODE>. Each setting is first mapped from a value between <CODE>0.0f</CODE> and <CODE>1.0f</CODE> to a value between <CODE>0</CODE> and <CODE>255</CODE>.</td>
184          </tr>
185          <tr>
186            <td width="100"> </td>
187            <th>
188<span class="argument">specular1B</span>
189            </th>
190<td width="100"><a href="../../../../../nn_types/u8.html">u8</a></td>
191<td>Blue component setting for specular 1. Type is <CODE>u8</CODE>. Either <CODE>dmp_FragmentLightSource[i].specular1</CODE> is set or the product of <CODE>dmp_FragmentMaterial.specular1</CODE> and <CODE>dmp_FragmentLightSource[i].specular1</CODE> is set depending on whether <CODE>true</CODE> or <CODE>false</CODE>, respectively, is specified to <CODE>Light::isEnableLutRefl</CODE>. Each setting is first mapped from a value between <CODE>0.0f</CODE> and <CODE>1.0f</CODE> to a value between <CODE>0</CODE> and <CODE>255</CODE>.</td>
192          </tr>
193          <tr>
194            <td width="100">
195<span class="protected_style" title="protected">protected</span> </td>
196            <th>
197<span class="argument">posXY</span>
198            </th>
199<td width="100"><a href="../../../../../nn_types/bit32.html">bit32</a></td>
200<td>Holds a light's X and Y coordinates converted into rendering command format. The type is <CODE>bit32</CODE>.</td>
201          </tr>
202          <tr>
203            <td width="100">
204<span class="protected_style" title="protected">protected</span> </td>
205            <th>
206<span class="argument">posZ</span>
207            </th>
208<td width="100"><a href="../../../../../nn_types/bit32.html"><CODE>bit32</CODE></a></td>
209<td>Holds a light's Z coordinate converted into rendering command format. The type is <CODE>bit32</CODE>.</td>
210          </tr>
211          <tr>
212            <td width="100">
213<span class="protected_style" title="protected">protected</span> </td>
214            <th>
215<span class="argument">isInfinity</span>
216            </th>
217<td width="100"><a href="../../../../../nn_types/u8.html">u8</a></td>
218<td>A flag that indicates whether to send a light's position to infinity. Type is <CODE>u8</CODE>.</td>
219          </tr>
220          <tr>
221            <td width="100">
222<span class="protected_style" title="protected">protected</span> </td>
223            <th>
224<span class="argument">distAttnBias</span>
225            </th>
226<td width="100"><a href="../../../../../nn_types/bit32.html"><CODE>bit32</CODE></a></td>
227<td>Holds a light's distance attenuation bias converted into rendering command format. The type is <CODE>bit32</CODE>.</td>
228          </tr>
229          <tr>
230            <td width="100">
231<span class="protected_style" title="protected">protected</span> </td>
232            <th>
233<span class="argument">distAttnScale</span>
234            </th>
235<td width="100"><a href="../../../../../nn_types/bit32.html"><CODE>bit32</CODE></a></td>
236<td>Holds a light's distance attenuation scale converted into rendering command format. The type is <CODE>bit32</CODE>.</td>
237          </tr>
238          <tr>
239            <td width="100">
240<span class="protected_style" title="protected">protected</span> </td>
241            <th>
242<span class="argument">spotDirectionXY</span>
243            </th>
244<td width="100"><a href="../../../../../nn_types/bit32.html"><CODE>bit32</CODE></a></td>
245<td>Holds the X and Y components of a spotlight's direction, converted into rendering command format. The type is <CODE>bit32</CODE>.</td>
246          </tr>
247          <tr>
248            <td width="100">
249<span class="protected_style" title="protected">protected</span> </td>
250            <th>
251<span class="argument">spotDirectionZ</span>
252            </th>
253<td width="100"><a href="../../../../../nn_types/bit32.html"><CODE>bit32</CODE></a></td>
254<td>Holds the Z component of a spotlight's direction, converted into rendering command format. The type is <CODE>bit32</CODE>.</td>
255          </tr> </table>
256      </div>
257    </a> <a name="function" id="function">
258<h2>Member Functions</h2>
259      <div class="section">
260        <table class="members">
261          <tr>
262            <td width="100">  </td>
263            <th>
264<a href="../../../../../nn/gr/CTR/FragmentLight/Source/SetPosition.html"><CODE>SetPosition</CODE></a>
265            </th>
266<td>Configures the light position. Converts the set value to a 16-bit floating point number used to set the rendering command and stores it.</td>
267          </tr>
268          <tr>
269            <td width="100">  </td>
270            <th>
271<a href="../../../../../nn/gr/CTR/FragmentLight/Source/SetSpotDirection.html">SetSpotDirection</a>
272            </th>
273<td>Sets the spotlight light direction. Converts the set value to a 13-bit fixed point number used to set the rendering command and stores it.</td>
274          </tr>
275          <tr>
276            <td width="100">  </td>
277            <th>
278<a href="../../../../../nn/gr/CTR/FragmentLight/Source/SetDistAttnScaleBias.html">SetDistAttnScaleBias</a>
279            </th>
280<td>Sets the scale and bias for distance attenuation. Converts the set value to a 20-bit floating point number used to set the rendering command and stores it.</td>
281          </tr>
282          <tr>
283            <td width="100">  </td>
284            <th>
285<a href="../../../../../nn/gr/CTR/FragmentLight/Source/SetDistAttnStartEnd.html">SetDistAttnStartEnd</a>
286            </th>
287<td>Sets scale and bias for distance attenuation by specifying an attenuation start distance and attenuation end distance. Converts the set values to scale and bias values, and then converts them to 20-bit floating point numbers used to set the render command and stores them.</td>
288          </tr>
289          <tr>
290            <td width="100">  </td>
291            <th>
292<a href="../../../../../nn/gr/CTR/FragmentLight/Source/MakeAllCommand.html"><CODE>MakeAllCommand</CODE></a>
293            </th>
294<td>Generates all light source commands based on configured data.</td>
295          </tr>
296          <tr>
297            <td width="100">  </td>
298            <th>
299<a href="../../../../../nn/gr/CTR/FragmentLight/Source/MakeCommand.html"><CODE>MakeCommand</CODE></a>
300            </th>
301<td>Generates all light source commands based on configured data. The <a href="../../../../../nn/gr/CTR/FragmentLight/Source/MakeAllCommand.html"><CODE>MakeAllCommand</CODE></a> function is called internally. This has been left to maintain compatibility.</td>
302          </tr>
303          <tr>
304            <td width="100">  </td>
305            <th>
306<a href="../../../../../nn/gr/CTR/FragmentLight/Source/MakeColorCommand.html"><CODE>MakeColorCommand</CODE></a>
307            </th>
308<td>Generates color information commands for light sources based on configured data.</td>
309          </tr>
310          <tr>
311            <td width="100">  </td>
312            <th>
313<a href="../../../../../nn/gr/CTR/FragmentLight/Source/MakeGeometryCommand.html"><CODE>MakeGeometryCommand</CODE></a>
314            </th>
315<td>Generates geometric information commands for light sources based on configured data.</td>
316          </tr>
317          <tr>
318            <td width="100">  </td>
319            <th>
320<a href="../../../../../nn/gr/CTR/FragmentLight/Source/Source.html">Source</a>
321            </th>
322<td>The constructor initializes member variables.</td>
323          </tr> </table>
324      </div>
325    </a>
326<h2>Revision History</h2>
327    <div class="section">
328      <dl class="history">
329        <dt>2010/09/15</dt>
330<dd>Initial version.<br />
331        </dd>
332      </dl>
333    </div>
334  <hr><p>CONFIDENTIAL</p></body>
335</html>
336