<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Irrlicht Engine: SLight.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <table class="irrlicht" > <tr valign="middle"> <td><font size="2"><a class="qindex" href="index.html"><font color="#FFFFFF">Home</font></a> | <a class="qindex" href="namespaces.html"><font color="#FFFFFF">Namespaces</font></a> | <a class="qindex" href="hierarchy.html"><font color="#FFFFFF">Hierarchy</font></a> | <a class="qindex" href="classes.html"><font color="#FFFFFF">Alphabetical List</font></a> | <a class="qindex" href="annotated.html"><font color="#FFFFFF"> Class list</font></a> | <a class="qindex" href="files.html"><font color="#FFFFFF">Files</font></a> | <a class="qindex" href="namespacemembers.html"><font color="#FFFFFF"> Namespace Members</font></a> | <a class="qindex" href="functions.html"><font color="#FFFFFF">Class members</font></a> | <a class="qindex" href="globals.html"><font color="#FFFFFF">File members</font></a> | <a class="qindex" href="pages.html"><font color="#FFFFFF">Tutorials</font></a></font> </td> </tr> </table> <!-- Generated by Doxygen 1.5.6 --> <h1>SLight.h</h1><a href="_s_light_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (C) 2002-2009 Nikolaus Gebhardt</span> <a name="l00002"></a>00002 <span class="comment">// This file is part of the "Irrlicht Engine".</span> <a name="l00003"></a>00003 <span class="comment">// For conditions of distribution and use, see copyright notice in irrlicht.h</span> <a name="l00004"></a>00004 <a name="l00005"></a>00005 <span class="preprocessor">#ifndef __S_LIGHT_H_INCLUDED__</span> <a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define __S_LIGHT_H_INCLUDED__</span> <a name="l00007"></a>00007 <span class="preprocessor"></span> <a name="l00008"></a>00008 <span class="preprocessor">#include "<a class="code" href="_s_color_8h.html">SColor.h</a>"</span> <a name="l00009"></a>00009 <a name="l00010"></a>00010 <span class="keyword">namespace </span>irr <a name="l00011"></a>00011 { <a name="l00012"></a>00012 <span class="keyword">namespace </span>video <a name="l00013"></a>00013 { <a name="l00014"></a>00014 <a name="l00016"></a><a class="code" href="namespaceirr_1_1video.html#af0e02f6f83cc35cf9e764bf18400d39">00016</a> <span class="keyword">enum</span> <a class="code" href="namespaceirr_1_1video.html#af0e02f6f83cc35cf9e764bf18400d39" title="Enumeration for different types of lights.">E_LIGHT_TYPE</a> <a name="l00017"></a>00017 { <a name="l00019"></a><a class="code" href="namespaceirr_1_1video.html#af0e02f6f83cc35cf9e764bf18400d3921113dc8282eeb64fa1d7ba0ec9ee26d">00019</a> <a class="code" href="namespaceirr_1_1video.html#af0e02f6f83cc35cf9e764bf18400d3921113dc8282eeb64fa1d7ba0ec9ee26d" title="point light, it has a position in space and radiates light in all directions">ELT_POINT</a>, <a name="l00021"></a><a class="code" href="namespaceirr_1_1video.html#af0e02f6f83cc35cf9e764bf18400d39613d955141b78edba7a1e2688b11448a">00021</a> <a class="code" href="namespaceirr_1_1video.html#af0e02f6f83cc35cf9e764bf18400d39613d955141b78edba7a1e2688b11448a" title="spot light, it has a position in space, a direction, and a limited cone of influence...">ELT_SPOT</a>, <a name="l00023"></a><a class="code" href="namespaceirr_1_1video.html#af0e02f6f83cc35cf9e764bf18400d3946a64f42740c097ee15d5c3a87961788">00023</a> <a class="code" href="namespaceirr_1_1video.html#af0e02f6f83cc35cf9e764bf18400d3946a64f42740c097ee15d5c3a87961788" title="directional light, coming from a direction from an infinite distance">ELT_DIRECTIONAL</a> <a name="l00024"></a>00024 }; <a name="l00025"></a>00025 <a name="l00027"></a><a class="code" href="namespaceirr_1_1video.html#345c3fd9c805bbe508a49fa367846bc8">00027</a> <span class="keyword">const</span> <a class="code" href="namespaceirr.html#9395eaea339bcb546b319e9c96bf7410" title="8 bit character variable.">c8</a>* <span class="keyword">const</span> <a class="code" href="namespaceirr_1_1video.html#345c3fd9c805bbe508a49fa367846bc8" title="Names for light types.">LightTypeNames</a>[] = <a name="l00028"></a>00028 { <a name="l00029"></a>00029 <span class="stringliteral">"Point"</span>, <a name="l00030"></a>00030 <span class="stringliteral">"Spot"</span>, <a name="l00031"></a>00031 <span class="stringliteral">"Directional"</span>, <a name="l00032"></a>00032 0 <a name="l00033"></a>00033 }; <a name="l00034"></a>00034 <a name="l00036"></a>00036 <a name="l00038"></a><a class="code" href="structirr_1_1video_1_1_s_light.html">00038</a> <span class="keyword">struct </span><a class="code" href="structirr_1_1video_1_1_s_light.html" title="structure for holding data describing a dynamic point light.">SLight</a> <a name="l00039"></a>00039 { <a name="l00040"></a><a class="code" href="structirr_1_1video_1_1_s_light.html#61379791eafc4f05373461d02c8d3f43">00040</a> <a class="code" href="structirr_1_1video_1_1_s_light.html#61379791eafc4f05373461d02c8d3f43">SLight</a>() : <a class="code" href="structirr_1_1video_1_1_s_light.html#120e9234a2141eb1fbe46cad23794e0e" title="Ambient color emitted by the light.">AmbientColor</a>(0.f,0.f,0.f), <a class="code" href="structirr_1_1video_1_1_s_light.html#226622e93aa1e249fe876fdb9d0186fe" title="Diffuse color emitted by the light.">DiffuseColor</a>(1.f,1.f,1.f), <a name="l00041"></a>00041 <a class="code" href="structirr_1_1video_1_1_s_light.html#2d66ad28850a8588b2ba727103710604" title="Specular color emitted by the light.">SpecularColor</a>(1.f,1.f,1.f), <a class="code" href="structirr_1_1video_1_1_s_light.html#06c10ab01b8ad1ee554b956bd5baeacc" title="Attenuation factors (constant, linear, quadratic).">Attenuation</a>(1.f,0.f,0.f), <a name="l00042"></a>00042 <a class="code" href="structirr_1_1video_1_1_s_light.html#38ee805b9145d4ab1b1a889bbded9adc" title="The angle of the spot&#39;s outer cone. Ignored for other lights.">OuterCone</a>(45.f), <a class="code" href="structirr_1_1video_1_1_s_light.html#b079c170fbab1e0a191e8801839d6c83" title="The angle of the spot&#39;s inner cone. Ignored for other lights.">InnerCone</a>(0.f), <a class="code" href="structirr_1_1video_1_1_s_light.html#38cea8db5e6951a9d98802f2f249129d" title="The light strength&#39;s decrease between Outer and Inner cone.">Falloff</a>(2.f), <a name="l00043"></a>00043 <a class="code" href="structirr_1_1video_1_1_s_light.html#c1f0fda0cc1780b09a2597adcfc9c946" title="Read-ONLY! Position of the light.">Position</a>(0.f,0.f,0.f), <a class="code" href="structirr_1_1video_1_1_s_light.html#226c488abec5696b995df6895ab42d41" title="Read-ONLY! Direction of the light.">Direction</a>(0.f,0.f,1.f), <a name="l00044"></a>00044 <a class="code" href="structirr_1_1video_1_1_s_light.html#9f3fbdf2869d9beca604ba1cca7499cb" title="Read-ONLY! Radius of light. Everything within this radius be be lighted.">Radius</a>(100.f), <a class="code" href="structirr_1_1video_1_1_s_light.html#c06681bb78d4911775f50d33e21761b4" title="Read-ONLY! Type of the light. Default: ELT_POINT.">Type</a>(<a class="code" href="namespaceirr_1_1video.html#af0e02f6f83cc35cf9e764bf18400d3921113dc8282eeb64fa1d7ba0ec9ee26d" title="point light, it has a position in space and radiates light in all directions">ELT_POINT</a>), <a class="code" href="structirr_1_1video_1_1_s_light.html#fbc66ada0baaf9f642d165fb8b11118b" title="Read-ONLY! Does the light cast shadows?">CastShadows</a>(true) <a name="l00045"></a>00045 {} <a name="l00046"></a>00046 <a name="l00048"></a><a class="code" href="structirr_1_1video_1_1_s_light.html#120e9234a2141eb1fbe46cad23794e0e">00048</a> <a class="code" href="classirr_1_1video_1_1_s_colorf.html" title="Class representing a color with four floats.">SColorf</a> <a class="code" href="structirr_1_1video_1_1_s_light.html#120e9234a2141eb1fbe46cad23794e0e" title="Ambient color emitted by the light.">AmbientColor</a>; <a name="l00049"></a>00049 <a name="l00051"></a>00051 <a name="l00052"></a><a class="code" href="structirr_1_1video_1_1_s_light.html#226622e93aa1e249fe876fdb9d0186fe">00052</a> <a class="code" href="classirr_1_1video_1_1_s_colorf.html" title="Class representing a color with four floats.">SColorf</a> <a class="code" href="structirr_1_1video_1_1_s_light.html#226622e93aa1e249fe876fdb9d0186fe" title="Diffuse color emitted by the light.">DiffuseColor</a>; <a name="l00053"></a>00053 <a name="l00055"></a>00055 <a name="l00056"></a><a class="code" href="structirr_1_1video_1_1_s_light.html#2d66ad28850a8588b2ba727103710604">00056</a> <a class="code" href="classirr_1_1video_1_1_s_colorf.html" title="Class representing a color with four floats.">SColorf</a> <a class="code" href="structirr_1_1video_1_1_s_light.html#2d66ad28850a8588b2ba727103710604" title="Specular color emitted by the light.">SpecularColor</a>; <a name="l00057"></a>00057 <a name="l00059"></a>00059 <a name="l00062"></a><a class="code" href="structirr_1_1video_1_1_s_light.html#06c10ab01b8ad1ee554b956bd5baeacc">00062</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">core::vector3df</a> <a class="code" href="structirr_1_1video_1_1_s_light.html#06c10ab01b8ad1ee554b956bd5baeacc" title="Attenuation factors (constant, linear, quadratic).">Attenuation</a>; <a name="l00063"></a>00063 <a name="l00065"></a><a class="code" href="structirr_1_1video_1_1_s_light.html#38ee805b9145d4ab1b1a889bbded9adc">00065</a> <a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a> <a class="code" href="structirr_1_1video_1_1_s_light.html#38ee805b9145d4ab1b1a889bbded9adc" title="The angle of the spot&#39;s outer cone. Ignored for other lights.">OuterCone</a>; <a name="l00066"></a>00066 <a name="l00068"></a><a class="code" href="structirr_1_1video_1_1_s_light.html#b079c170fbab1e0a191e8801839d6c83">00068</a> <a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a> <a class="code" href="structirr_1_1video_1_1_s_light.html#b079c170fbab1e0a191e8801839d6c83" title="The angle of the spot&#39;s inner cone. Ignored for other lights.">InnerCone</a>; <a name="l00069"></a>00069 <a name="l00071"></a><a class="code" href="structirr_1_1video_1_1_s_light.html#38cea8db5e6951a9d98802f2f249129d">00071</a> <a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a> <a class="code" href="structirr_1_1video_1_1_s_light.html#38cea8db5e6951a9d98802f2f249129d" title="The light strength&#39;s decrease between Outer and Inner cone.">Falloff</a>; <a name="l00072"></a>00072 <a name="l00074"></a>00074 <a name="l00075"></a><a class="code" href="structirr_1_1video_1_1_s_light.html#c1f0fda0cc1780b09a2597adcfc9c946">00075</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">core::vector3df</a> <a class="code" href="structirr_1_1video_1_1_s_light.html#c1f0fda0cc1780b09a2597adcfc9c946" title="Read-ONLY! Position of the light.">Position</a>; <a name="l00076"></a>00076 <a name="l00078"></a>00078 <a name="l00079"></a><a class="code" href="structirr_1_1video_1_1_s_light.html#226c488abec5696b995df6895ab42d41">00079</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">core::vector3df</a> <a class="code" href="structirr_1_1video_1_1_s_light.html#226c488abec5696b995df6895ab42d41" title="Read-ONLY! Direction of the light.">Direction</a>; <a name="l00080"></a>00080 <a name="l00082"></a><a class="code" href="structirr_1_1video_1_1_s_light.html#9f3fbdf2869d9beca604ba1cca7499cb">00082</a> <a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a> <a class="code" href="structirr_1_1video_1_1_s_light.html#9f3fbdf2869d9beca604ba1cca7499cb" title="Read-ONLY! Radius of light. Everything within this radius be be lighted.">Radius</a>; <a name="l00083"></a>00083 <a name="l00085"></a><a class="code" href="structirr_1_1video_1_1_s_light.html#c06681bb78d4911775f50d33e21761b4">00085</a> <a class="code" href="namespaceirr_1_1video.html#af0e02f6f83cc35cf9e764bf18400d39" title="Enumeration for different types of lights.">E_LIGHT_TYPE</a> <a class="code" href="structirr_1_1video_1_1_s_light.html#c06681bb78d4911775f50d33e21761b4" title="Read-ONLY! Type of the light. Default: ELT_POINT.">Type</a>; <a name="l00086"></a>00086 <a name="l00088"></a><a class="code" href="structirr_1_1video_1_1_s_light.html#fbc66ada0baaf9f642d165fb8b11118b">00088</a> <span class="keywordtype">bool</span> <a class="code" href="structirr_1_1video_1_1_s_light.html#fbc66ada0baaf9f642d165fb8b11118b" title="Read-ONLY! Does the light cast shadows?">CastShadows</a>:1; <a name="l00089"></a>00089 }; <a name="l00090"></a>00090 <a name="l00091"></a>00091 } <span class="comment">// end namespace video</span> <a name="l00092"></a>00092 } <span class="comment">// end namespace irr</span> <a name="l00093"></a>00093 <a name="l00094"></a>00094 <span class="preprocessor">#endif</span> <a name="l00095"></a>00095 <span class="preprocessor"></span> </pre></div></div> <hr size="1"> <address style="align: right;"> <small> </small> </address> <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td width="0"> <div align="left"><small><a href="http://irrlicht.sourceforge.net" target="_blank"><img src="irrlicht.png" alt="The Irrlicht Engine" align="middle" border=0 width=88 height=31></a></small></div></td> <td> <div align="left"><small><em><font size="2">The <a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht Engine</a> Documentation © 2003-2009 by Nikolaus Gebhardt. Generated on Sun Jan 10 09:24:05 2010 by <a href="http://www.doxygen.org" target="_blank">Doxygen</a> (1.5.6)</font></em></small></div></td> </tr> </table> <address style="align: right;"> </address> </body> </html>