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 span.virtual_style 22 { 23 font-size : 8pt; 24 color : white; 25 font-weight : bold; 26 background : #0a0; 27 border-left : solid 1px #0f0; 28 border-top : solid 1px #0f0; 29 border-right : solid 1px #060; 30 border-bottom : solid 1px #060; 31 padding-left : 2px; 32 padding-right : 2px; 33 } 34 span.protected_style 35 { 36 font-size : 8pt; 37 color : white; 38 font-weight : bold; 39 background : #444; 40 border-left : solid 1px #ccc; 41 border-top : solid 1px #ccc; 42 border-right : solid 1px #222; 43 border-bottom : solid 1px #222; 44 padding-left : 2px; 45 padding-right : 2px; 46 } 47 --></style> 48<title>nn::gd::CTR::Light</title> 49 </head> 50 <body> 51<h1><CODE><a href="../../../../nn/Overview.html">nn</a>::<a href="../../../../nn/gd/Overview.html">gd</a>::<a href="../../../../nn/gd/CTR/Overview.html">CTR</a>::Light</CODE> Class</h1> 52<h2>Syntax</h2> 53 <div class="section"> 54<pre class="definition">class Light</pre> 55 </div> 56<h2>Description</h2> 57 <div class="section"> 58<p>This class manages settings for each of eight light sources.</p><p><anchor id="classnn_1_1gd_1_1_c_t_r_1_1_lighting_stage_1LightingStage" /> Because each of the eight lights using the lighting stage can be accessed using the <CODE>LightingStage::ligh</CODE> variable, there is no need to create a new Light object. </p><!-- write here --></div> 59 <a name="enum" id="enum"> 60<h2>Enumerated Types</h2> 61 <div class="section"> 62 <table class="members"> 63 <tr> 64 <td width="100"> </td> 65 <th> 66<a href="../../../../nn/gd/CTR/Light/SourceType.html">SourceType</a> 67 </th> 68<td>This is a fragment light type <CODE>enum</CODE> value.</td> 69 </tr> 70 <tr> 71 <td width="100"> </td> 72 <th> 73<a href="../../../../nn/gd/CTR/Light/LightLookUpTableUploadId.html">LightLookUpTableUploadId</a> 74 </th> 75<td>This is a fragment light lookup table <CODE>enum</CODE> value. It can be independently set for each separate light. </td> 76 </tr> </table> 77 </div> 78 </a> <a name="function" id="function"> 79<h2>Member Functions</h2> 80 <div class="section"> 81 <table class="members"> 82 <tr> 83 <td width="100"> </td> 84 <th> 85<a href="../../../../nn/gd/CTR/Light/EnableLight.html">EnableLight</a> 86 </th> 87<td>Enables or disables each light source. </td> 88 </tr> 89 <tr> 90 <td width="100"> </td> 91 <th> 92<a href="../../../../nn/gd/CTR/Light/SetColorAmbient.html">SetColorAmbient</a> 93 </th> 94<td>Sets the ambient color of each light source. This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.)</td> 95 </tr> 96 <tr> 97 <td width="100"> </td> 98 <th> 99<a href="../../../../nn/gd/CTR/Light/SetColorDiffuse.html">SetColorDiffuse</a> 100 </th> 101<td>Sets the diffuse color of each light source. This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.)</td> 102 </tr> 103 <tr> 104 <td width="100"> </td> 105 <th> 106<a href="../../../../nn/gd/CTR/Light/SetColorSpecular0.html">SetColorSpecular0</a> 107 </th> 108<td>Sets Specular Color 0 for each light source. This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.)</td> 109 </tr> 110 <tr> 111 <td width="100"> </td> 112 <th> 113<a href="../../../../nn/gd/CTR/Light/SetColorSpecular1.html">SetColorSpecular1</a> 114 </th> 115<td>Sets Specular Color 1 for each light source. This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.)</td> 116 </tr> 117 <tr> 118 <td width="100"> </td> 119 <th> 120<a href="../../../../nn/gd/CTR/Light/SetPosition.html"><CODE>SetPosition</CODE></a> 121 </th> 122<td>This is an immediate function. It sets the light direction. <a href="../../../../nn/gd/CTR/Light/SetLightType.html"><CODE>SOURCE_TYPE_PUNCTUAL</CODE> must be specified for a light type set using <a href="../../../../nn/gd/CTR/Light/SetLightType.html">SetLightType</a>. (The resulting command from the immediate function is inserted into the command buffer.) <br /> Note: This function sets the same registers as the <a href="../../../../nn/gd/CTR/Light/SetDirection.html">Light::SetDirection</a> function. </td> 123 </tr> 124 <tr> 125 <td width="100"> </td> 126 <th> 127<a href="../../../../nn/gd/CTR/Light/SetDirection.html">SetDirection</a> 128 </th> 129<td>This is an immediate function. Sets the light direction. <CODE>SOURCE_TYPE_DIRECTIONAL</CODE> must be specified for the light type to be set using <a href="../../../../nn/gd/CTR/Light/SetLightType.html">SetLightType</a>. (The resulting command from the immediate function is inserted into the command buffer.) <br /> Note: This function sets the same registers as the <a href="../../../../nn/gd/CTR/Light/SetPosition.html">Light::SetDirection</a> function. </td> 130 </tr> 131 <tr> 132 <td width="100"> </td> 133 <th> 134<a href="../../../../nn/gd/CTR/Light/SetSpotDirection.html">SetSpotDirection</a> 135 </th> 136<td>Sets the spotlight light direction. <CODE>SOURCE_TYPE_PUNCTUAL</CODE> must be specified for the light type to be set using <a href="../../../../nn/gd/CTR/Light/SetLightType.html">SetLightType<a href="../../../../nn/gd/CTR/Light/SetLightType.html">. This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.)</td> 137 </tr> 138 <tr> 139 <td width="100"> </td> 140 <th> 141<a href="../../../../nn/gd/CTR/Light/SetLightType.html">SetLightType</a> 142 </th> 143<td>Configures the light type. (<CODE>SOURCE_TYPE_DIRECTIONAL</CODE> or <CODE>SOURCE_TYPE_PUNCTUAL</CODE>) This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.)</td> 144 </tr> 145 <tr> 146 <td width="100"> </td> 147 <th> 148<a href="../../../../nn/gd/CTR/Light/SetDistanceAttenuationScaleBias.html">SetDistanceAttenuationScaleBias</a> 149 </th> 150<td>Sets the scale and bias for input values to the distance attenuation lookup table. This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.)</td> 151 </tr> 152 <tr> 153 <td width="100"> </td> 154 <th> 155<a href="../../../../nn/gd/CTR/Light/EnableTwoSideDiffuse.html">EnableTwoSideDiffuse</a> 156 </th> 157<td>Sets single-side or double-side lighting. This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.)</td> 158 </tr> 159 <tr> 160 <td width="100"> </td> 161 <th> 162<a href="../../../../nn/gd/CTR/Light/EnableGeomFactor0.html">EnableGeomFactor0</a> 163 </th> 164<td>Sets whether lights will use Geometric Factor 0. This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.)</td> 165 </tr> 166 <tr> 167 <td width="100"> </td> 168 <th> 169<a href="../../../../nn/gd/CTR/Light/EnableGeomFactor1.html">EnableGeomFactor1</a> 170 </th> 171<td>Sets whether lights will use Geometric Factor 1. This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.)</td> 172 </tr> 173 <tr> 174 <td width="100"> </td> 175 <th> 176<a href="../../../../nn/gd/CTR/Light/EnableSpotLight.html">EnableSpotLight</a> 177 </th> 178<td>Enables or disables spotlights. A lookup table is used if enabled. <CODE>SOURCE_TYPE_PUNCTUAL</CODE> must be specified for a light type set using <a href="../../../../nn/gd/CTR/Light/SetLightType.html">SetLightType</a>. </td> 179 </tr> 180 <tr> 181 <td width="100"> </td> 182 <th> 183<a href="../../../../nn/gd/CTR/Light/EnableDistanceAttenuation.html">EnableDistanceAttenuation</a> 184 </th> 185<td>Enables or disables distance attenuation of lights. A lookup table is used if enabled. </td> 186 </tr> 187 <tr> 188 <td width="100"> </td> 189 <th> 190<a href="../../../../nn/gd/CTR/Light/EnableShadowed.html">EnableShadowed</a> 191 </th> 192<td>Sets the element for which shadow is to be adjusted. </td> 193 </tr> 194 <tr> 195 <td width="100"> </td> 196 <th> 197<a href="../../../../nn/gd/CTR/Light/UploadLookUpTableFloat.html">UploadLookUpTableFloat</a> 198 </th> 199<td>Sets the lighting lookup table. The floating point value you specify is converted into fixed point data by this function and then sent to the GPU. </td> 200 </tr> 201 <tr> 202 <td width="100"> </td> 203 <th> 204<a href="../../../../nn/gd/CTR/Light/UploadLookUpTableNative.html">UploadLookUpTableNative</a> 205 </th> 206<td>Sets the lighting lookup table. The data used by this function has already been converted from floating point to fixed point. </td> 207 </tr> </table> 208 </div> 209 </a> 210<h2>Revision History</h2> 211 <div class="section"> 212 <dl class="history"> 213 <dt>2011/02/15</dt> 214<dd>Initial version.<br /> 215 </dd> 216 </dl> 217 </div> 218 <hr><p>CONFIDENTIAL</p></body> 219</html> 220