<!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>Crystal Space 1.2.1: iengine/light.h Source File (Crystal Space 1.2.1 Public API Reference)</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <table border="0" cellpadding="0" cellspacing="0" width="100%" class="head"> <tr height="59"> <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td> <td class="head"><h2>Public API Reference</h2></td> </tr> <tr height="11"> <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td> </tr> </table> <div class="content"> <!-- Generated by Doxygen 1.5.3 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="classes.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> <h1>iengine/light.h</h1><a href="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">/*</span> <a name="l00002"></a>00002 <span class="comment"> Copyright (C) 2000-2001 by Jorrit Tyberghein</span> <a name="l00003"></a>00003 <span class="comment"> Copyright (C) 1999 by Andrew Zabolotny <bit@eltech.ru></span> <a name="l00004"></a>00004 <span class="comment"></span> <a name="l00005"></a>00005 <span class="comment"> This library is free software; you can redistribute it and/or</span> <a name="l00006"></a>00006 <span class="comment"> modify it under the terms of the GNU Library General Public</span> <a name="l00007"></a>00007 <span class="comment"> License as published by the Free Software Foundation; either</span> <a name="l00008"></a>00008 <span class="comment"> version 2 of the License, or (at your option) any later version.</span> <a name="l00009"></a>00009 <span class="comment"></span> <a name="l00010"></a>00010 <span class="comment"> This library is distributed in the hope that it will be useful,</span> <a name="l00011"></a>00011 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00012"></a>00012 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00013"></a>00013 <span class="comment"> Library General Public License for more details.</span> <a name="l00014"></a>00014 <span class="comment"></span> <a name="l00015"></a>00015 <span class="comment"> You should have received a copy of the GNU Library General Public</span> <a name="l00016"></a>00016 <span class="comment"> License along with this library; if not, write to the Free</span> <a name="l00017"></a>00017 <span class="comment"> Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span> <a name="l00018"></a>00018 <span class="comment">*/</span> <a name="l00019"></a>00019 <a name="l00020"></a>00020 <span class="preprocessor">#ifndef __CS_IENGINE_LIGHT_H__</span> <a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define __CS_IENGINE_LIGHT_H__</span> <a name="l00022"></a>00022 <span class="preprocessor"></span> <a name="l00030"></a>00030 <span class="preprocessor">#include "<a class="code" href="scf_8h.html" title="Crystal Space Shared Class Facility (SCF).">csutil/scf.h</a>"</span> <a name="l00031"></a>00031 <a name="l00032"></a>00032 <span class="preprocessor">#include "<a class="code" href="fview_8h.html" title="Frustum view.">iengine/fview.h</a>"</span> <a name="l00033"></a>00033 <a name="l00034"></a>00034 <span class="keyword">class </span><a class="code" href="classcsColor.html" title="A class used to represent a color in RGB space.">csColor</a>; <a name="l00035"></a>00035 <span class="keyword">class </span><a class="code" href="classcsFlags.html" title="Set of flags which can be accessed through masks.">csFlags</a>; <a name="l00036"></a>00036 <span class="keyword">class </span><a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>; <a name="l00037"></a>00037 <a name="l00038"></a>00038 <span class="keyword">struct </span><a class="code" href="structiLight.html" title="The iLight interface is the SCF interface for the csLight class.">iLight</a>; <a name="l00039"></a>00039 <span class="keyword">struct </span><a class="code" href="structiLightingInfo.html" title="This interface is implemented by mesh objects that have some kind of lighting system...">iLightingInfo</a>; <a name="l00040"></a>00040 <span class="keyword">struct </span><a class="code" href="structiMovable.html" title="This interface represents the position and orientation of an object relative to its...">iMovable</a>; <a name="l00041"></a>00041 <span class="keyword">struct </span><a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>; <a name="l00042"></a>00042 <span class="keyword">struct </span><a class="code" href="structiSector.html" title="The iSector interface is used to work with &quot;sectors&quot;.">iSector</a>; <a name="l00043"></a>00043 <span class="keyword">struct </span><a class="code" href="structiSceneNode.html" title="This interface represents a node in the scene graph.">iSceneNode</a>; <a name="l00044"></a>00044 <span class="keyword">struct </span><a class="code" href="structiShaderVariableContext.html" title="This is a baseclass for all interfaces which provides shadervariables both dynamically...">iShaderVariableContext</a>; <a name="l00045"></a>00045 <a name="l00046"></a>00046 <span class="keyword">struct </span><a class="code" href="structiBaseHalo.html" title="This is the basic interface for all types of halos.">iBaseHalo</a>; <a name="l00047"></a>00047 <span class="keyword">struct </span><a class="code" href="structiCrossHalo.html" title="This is a halo which resembles a cross.">iCrossHalo</a>; <a name="l00048"></a>00048 <span class="keyword">struct </span><a class="code" href="structiNovaHalo.html" title="This is a halo which resembles a nova.">iNovaHalo</a>; <a name="l00049"></a>00049 <span class="keyword">struct </span><a class="code" href="structiFlareHalo.html" title="This is a halo which resembles a (solar) flare.">iFlareHalo</a>; <a name="l00050"></a>00050 <a name="l00058"></a><a class="code" href="group__engine3d__light.html#g618a4ace7e4102bf581e00d41dc4541f">00058</a> <span class="preprocessor">#define CS_LIGHT_ACTIVEHALO 0x80000000</span> <a name="l00059"></a>00059 <span class="preprocessor"></span> <a name="l00064"></a><a class="code" href="group__engine3d__light.html#g226054df63a389a3d03a47358dacf665">00064</a> <span class="keyword">enum</span> <a class="code" href="group__engine3d__light.html#g226054df63a389a3d03a47358dacf665">csLightDynamicType</a> <a name="l00065"></a>00065 { <a name="l00071"></a><a class="code" href="group__engine3d__light.html#gg226054df63a389a3d03a47358dacf665f14d1d673772c44312e9d38e2925f120">00071</a> <a class="code" href="group__engine3d__light.html#gg226054df63a389a3d03a47358dacf665f14d1d673772c44312e9d38e2925f120" title="A fully static light.">CS_LIGHT_DYNAMICTYPE_STATIC</a> = 1, <a name="l00072"></a>00072 <a name="l00078"></a><a class="code" href="group__engine3d__light.html#gg226054df63a389a3d03a47358dacf66582e376f7e9602fe9f1c7c96e5bfabb09">00078</a> <a class="code" href="group__engine3d__light.html#gg226054df63a389a3d03a47358dacf66582e376f7e9602fe9f1c7c96e5bfabb09" title="A pseudo-dynamic light.">CS_LIGHT_DYNAMICTYPE_PSEUDO</a> = 2, <a name="l00079"></a>00079 <a name="l00085"></a><a class="code" href="group__engine3d__light.html#gg226054df63a389a3d03a47358dacf665edf9b287ab7f32dbe0485e0b9a9f2fb1">00085</a> <a class="code" href="group__engine3d__light.html#gg226054df63a389a3d03a47358dacf665edf9b287ab7f32dbe0485e0b9a9f2fb1" title="A fully dynamic light.">CS_LIGHT_DYNAMICTYPE_DYNAMIC</a> = 3 <a name="l00086"></a>00086 }; <a name="l00089"></a>00089 <a name="l00090"></a><a class="code" href="group__engine3d__light.html#gf1ec53156d04ea664bc01d3a1cdba234">00090</a> <span class="preprocessor">#define CS_DEFAULT_LIGHT_LEVEL 20</span> <a name="l00092"></a><a class="code" href="group__engine3d__light.html#ge3109b162d2aced91b47e8800802d69b">00092</a> <span class="preprocessor">#define CS_NORMAL_LIGHT_LEVEL 128</span> <a name="l00093"></a>00093 <span class="preprocessor"></span> <a name="l00107"></a><a class="code" href="group__engine3d__light.html#g0040eead4e75eb362c14a866cce0f728">00107</a> <span class="keyword">enum</span> <a class="code" href="group__engine3d__light.html#g0040eead4e75eb362c14a866cce0f728">csLightAttenuationMode</a> <a name="l00108"></a>00108 { <a name="l00110"></a><a class="code" href="group__engine3d__light.html#gg0040eead4e75eb362c14a866cce0f728b39b476b187c7b9040eac807cc41d5c3">00110</a> <a class="code" href="group__engine3d__light.html#gg0040eead4e75eb362c14a866cce0f728b39b476b187c7b9040eac807cc41d5c3" title="no attenuation: light * 1">CS_ATTN_NONE</a> = 0, <a name="l00112"></a><a class="code" href="group__engine3d__light.html#gg0040eead4e75eb362c14a866cce0f728a4ebc6433f9d886c020832484ff3c2e3">00112</a> <a class="code" href="group__engine3d__light.html#gg0040eead4e75eb362c14a866cce0f728a4ebc6433f9d886c020832484ff3c2e3" title="linear attenuation: light * (1 - distance / constant1)">CS_ATTN_LINEAR</a> = 1, <a name="l00114"></a><a class="code" href="group__engine3d__light.html#gg0040eead4e75eb362c14a866cce0f7284e3379a01573692b0927c34f8f394d44">00114</a> <a class="code" href="group__engine3d__light.html#gg0040eead4e75eb362c14a866cce0f7284e3379a01573692b0927c34f8f394d44" title="inverse attenuation: light / distance">CS_ATTN_INVERSE</a> = 2, <a name="l00116"></a><a class="code" href="group__engine3d__light.html#gg0040eead4e75eb362c14a866cce0f728c9bdb953d8faad6f0ae99c32a372325e">00116</a> <a class="code" href="group__engine3d__light.html#gg0040eead4e75eb362c14a866cce0f728c9bdb953d8faad6f0ae99c32a372325e" title="realistic attenuation: light / distance^2">CS_ATTN_REALISTIC</a> = 3, <a name="l00121"></a><a class="code" href="group__engine3d__light.html#gg0040eead4e75eb362c14a866cce0f72842742eb3305f7f388b5a8d6f82efc4ff">00121</a> <a class="code" href="group__engine3d__light.html#gg0040eead4e75eb362c14a866cce0f72842742eb3305f7f388b5a8d6f82efc4ff" title="CLQ, Constant Linear Quadratic: light / (constant1 + constant2*distance + constant3*distance^2)...">CS_ATTN_CLQ</a> = 4 <a name="l00122"></a>00122 }; <a name="l00137"></a><a class="code" href="group__engine3d__light.html#ge4baf0a9f20299ab4c39397c9bfbe264">00137</a> <span class="keyword">enum</span> <a class="code" href="group__engine3d__light.html#ge4baf0a9f20299ab4c39397c9bfbe264" title="Type of lightsource.">csLightType</a> <a name="l00138"></a>00138 { <a name="l00140"></a><a class="code" href="group__engine3d__light.html#gge4baf0a9f20299ab4c39397c9bfbe264f7e1a9262208f00851f4076b8b278d11">00140</a> <a class="code" href="group__engine3d__light.html#gge4baf0a9f20299ab4c39397c9bfbe264f7e1a9262208f00851f4076b8b278d11" title="Point light.">CS_LIGHT_POINTLIGHT</a>, <a name="l00142"></a><a class="code" href="group__engine3d__light.html#gge4baf0a9f20299ab4c39397c9bfbe26429e6aa791578f256f5f33f460f92019e">00142</a> <a class="code" href="group__engine3d__light.html#gge4baf0a9f20299ab4c39397c9bfbe26429e6aa791578f256f5f33f460f92019e" title="Directional light.">CS_LIGHT_DIRECTIONAL</a>, <a name="l00144"></a><a class="code" href="group__engine3d__light.html#gge4baf0a9f20299ab4c39397c9bfbe2646ad3bf0bda6156f8f112a482cd7dfdd2">00144</a> <a class="code" href="group__engine3d__light.html#gge4baf0a9f20299ab4c39397c9bfbe2646ad3bf0bda6156f8f112a482cd7dfdd2" title="Spot light.">CS_LIGHT_SPOTLIGHT</a> <a name="l00145"></a>00145 }; <a name="l00146"></a>00146 <a name="l00155"></a><a class="code" href="structiLightCallback.html">00155</a> <span class="keyword">struct </span><a class="code" href="structiLightCallback.html" title="Set a callback which is called when this light color is changed.">iLightCallback</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one...">iBase</a> <a name="l00156"></a>00156 { <a name="l00157"></a>00157 SCF_INTERFACE(<a class="code" href="structiLightCallback.html" title="Set a callback which is called when this light color is changed.">iLightCallback</a>,2,0,0); <a name="l00162"></a>00162 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLightCallback.html#5d23046d08c75f0ada3645b88f0ee4df" title="Light color will be changed.">OnColorChange</a> (<a class="code" href="structiLight.html" title="The iLight interface is the SCF interface for the csLight class.">iLight</a>* light, <span class="keyword">const</span> <a class="code" href="classcsColor.html" title="A class used to represent a color in RGB space.">csColor</a>& newcolor) = 0; <a name="l00163"></a>00163 <a name="l00168"></a>00168 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLightCallback.html#6c1b0de1ee49e6593f6ae0a723c7f7e9" title="Light position will be changed.">OnPositionChange</a> (<a class="code" href="structiLight.html" title="The iLight interface is the SCF interface for the csLight class.">iLight</a>* light, <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& newpos) = 0; <a name="l00169"></a>00169 <a name="l00174"></a>00174 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLightCallback.html#b543f84bd4985a6bbd6f3308c1972cf1" title="Sector will be changed.">OnSectorChange</a> (<a class="code" href="structiLight.html" title="The iLight interface is the SCF interface for the csLight class.">iLight</a>* light, <a class="code" href="structiSector.html" title="The iSector interface is used to work with &quot;sectors&quot;.">iSector</a>* newsector) = 0; <a name="l00175"></a>00175 <a name="l00180"></a>00180 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLightCallback.html#1a930f010a89e7453fb68f910dc3416f" title="Radius will be changed.">OnRadiusChange</a> (<a class="code" href="structiLight.html" title="The iLight interface is the SCF interface for the csLight class.">iLight</a>* light, <span class="keywordtype">float</span> newradius) = 0; <a name="l00181"></a>00181 <a name="l00186"></a>00186 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLightCallback.html#cbfd8c06700bfda6452b4c34e46af7ad" title="Light will be destroyed.">OnDestroy</a> (<a class="code" href="structiLight.html" title="The iLight interface is the SCF interface for the csLight class.">iLight</a>* light) = 0; <a name="l00187"></a>00187 <a name="l00192"></a>00192 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLightCallback.html#8dda5759356b957b809a64ebf265d90b" title="Attenuation will be changed.">OnAttenuationChange</a> (<a class="code" href="structiLight.html" title="The iLight interface is the SCF interface for the csLight class.">iLight</a>* light, <span class="keywordtype">int</span> newatt) = 0; <a name="l00193"></a>00193 }; <a name="l00194"></a>00194 <a name="l00195"></a>00195 <a name="l00231"></a><a class="code" href="structiLight.html">00231</a> <span class="keyword">struct </span><a class="code" href="structiLight.html" title="The iLight interface is the SCF interface for the csLight class.">iLight</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one...">iBase</a> <a name="l00232"></a>00232 { <a name="l00233"></a>00233 SCF_INTERFACE(<a class="code" href="structiLight.html" title="The iLight interface is the SCF interface for the csLight class.">iLight</a>,2,0,0); <a name="l00235"></a>00235 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="structiLight.html#1fbc8a0bd8aae9f5d4bab8dfbec34057" title="Get the id of this light. This is a 16-byte MD5.">GetLightID</a> () = 0; <a name="l00236"></a>00236 <a name="l00238"></a>00238 <span class="keyword">virtual</span> <a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a> *<a class="code" href="structiLight.html#8e1fbeac15ab5186181057b992979711" title="Get the iObject for this light.">QueryObject</a>() = 0; <a name="l00239"></a>00239 <a name="l00247"></a>00247 <span class="keyword">virtual</span> <a class="code" href="group__engine3d__light.html#g226054df63a389a3d03a47358dacf665">csLightDynamicType</a> <a class="code" href="structiLight.html#dd0ef69cccc5ecf03c9ac55a65736f40" title="Get the dynamic type of this light.">GetDynamicType</a> () <span class="keyword">const</span> = 0; <a name="l00248"></a>00248 <a name="l00253"></a>00253 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& <a class="code" href="structiLight.html#8128155e00af16005434bb3754302415" title="Get the position of this light (local transformation relative to whatever parent...">GetCenter</a> () <span class="keyword">const</span> = 0; <a name="l00258"></a>00258 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a> <a class="code" href="structiLight.html#1b5ab298a73d752456b4ba116dc3936f" title="Get the position of this light.">GetFullCenter</a> () <span class="keyword">const</span> = 0; <a name="l00260"></a>00260 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLight.html#627fb693493472574fc98905a34a2065" title="Set the position of this light.">SetCenter</a> (<span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& pos) = 0; <a name="l00261"></a>00261 <a name="l00263"></a>00263 <span class="keyword">virtual</span> <a class="code" href="structiSector.html" title="The iSector interface is used to work with &quot;sectors&quot;.">iSector</a> *<a class="code" href="structiLight.html#d92afb28c0be8dfebd5f7f1c2df4b61a" title="Get the sector for this light.">GetSector</a> () = 0; <a name="l00264"></a>00264 <a name="l00266"></a>00266 <span class="keyword">virtual</span> <a class="code" href="structiMovable.html" title="This interface represents the position and orientation of an object relative to its...">iMovable</a> *<a class="code" href="structiLight.html#6ad70e7c68c0adbf0f7da50d5fa6e937" title="Get the movable for this light.">GetMovable</a> () = 0; <a name="l00267"></a>00267 <a name="l00271"></a>00271 <span class="keyword">virtual</span> <a class="code" href="structiSceneNode.html" title="This interface represents a node in the scene graph.">iSceneNode</a>* <a class="code" href="structiLight.html#8a30a1abe6d01660d6a4f2e4fde35ca5" title="Get the scene node that this object represents.">QuerySceneNode</a> () = 0; <a name="l00272"></a>00272 <a name="l00274"></a>00274 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classcsColor.html" title="A class used to represent a color in RGB space.">csColor</a>& <a class="code" href="structiLight.html#77fb5e29ce2222ca2f81fd17cf24e865" title="Get the diffuse color of this light.">GetColor</a> () <span class="keyword">const</span> = 0; <a name="l00276"></a>00276 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLight.html#d2f8a660d38c48cd06d0993f86959eaf" title="Set the diffuse color of this light.">SetColor</a> (<span class="keyword">const</span> <a class="code" href="classcsColor.html" title="A class used to represent a color in RGB space.">csColor</a>& col) = 0; <a name="l00277"></a>00277 <a name="l00279"></a>00279 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classcsColor.html" title="A class used to represent a color in RGB space.">csColor</a>& <a class="code" href="structiLight.html#c33a9409847483d3e4bb05798b1abc37" title="Get the specular color of this light.">GetSpecularColor</a> () <span class="keyword">const</span> = 0; <a name="l00281"></a>00281 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLight.html#4c428eb4e6936b728687914e1beaf180" title="Set the specular color of this light.">SetSpecularColor</a> (<span class="keyword">const</span> <a class="code" href="classcsColor.html" title="A class used to represent a color in RGB space.">csColor</a>& col) = 0; <a name="l00282"></a>00282 <a name="l00284"></a>00284 <span class="keyword">virtual</span> <a class="code" href="group__engine3d__light.html#ge4baf0a9f20299ab4c39397c9bfbe264" title="Type of lightsource.">csLightType</a> <a class="code" href="structiLight.html#748df08f3a0843bde5a9ef5da6bc400d" title="Get the light type of this light.">GetType</a> () <span class="keyword">const</span> = 0; <a name="l00286"></a>00286 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLight.html#824914dc3d04b8ef26d6673c676efdf7" title="Set the light type of this light.">SetType</a> (<a class="code" href="group__engine3d__light.html#ge4baf0a9f20299ab4c39397c9bfbe264" title="Type of lightsource.">csLightType</a> type) = 0; <a name="l00287"></a>00287 <a name="l00292"></a>00292 <span class="keyword">virtual</span> <a class="code" href="group__engine3d__light.html#g0040eead4e75eb362c14a866cce0f728">csLightAttenuationMode</a> <a class="code" href="structiLight.html#97d948868d7501f3ba3c5aa36cc2942d" title="Return current attenuation mode.">GetAttenuationMode</a> () <span class="keyword">const</span> = 0; <a name="l00297"></a>00297 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLight.html#5090282ba495a664a990e91323d698cf" title="Set attenuation mode.">SetAttenuationMode</a> (<a class="code" href="group__engine3d__light.html#g0040eead4e75eb362c14a866cce0f728">csLightAttenuationMode</a> a) = 0; <a name="l00298"></a>00298 <a name="l00303"></a>00303 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLight.html#e6786b015faae6042b379c48df8a1364" title="Set attenuation constants.">SetAttenuationConstants</a> (<span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& constants) = 0; <a name="l00308"></a>00308 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a> &<a class="code" href="structiLight.html#94727bcb92ab6f0fb5cb91d6a9fea3b2" title="Get attenuation constants.">GetAttenuationConstants</a> () <span class="keyword">const</span> = 0; <a name="l00309"></a>00309 <a name="l00316"></a>00316 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="structiLight.html#a76e798aa9fdbd32d219638981d2d2c3" title="Get the the maximum distance at which the light is guranteed to shine.">GetCutoffDistance</a> () <span class="keyword">const</span> = 0; <a name="l00317"></a>00317 <a name="l00324"></a>00324 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLight.html#9dfa963537d9f0eb1ac787bba49453ed" title="Set the the maximum distance at which the light is guranteed to shine.">SetCutoffDistance</a> (<span class="keywordtype">float</span> distance) = 0; <a name="l00325"></a>00325 <a name="l00331"></a>00331 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="structiLight.html#564e3004f835323698f1b2576ac3954e" title="Get radial cutoff distance for directional lights.">GetDirectionalCutoffRadius</a> () <span class="keyword">const</span> = 0; <a name="l00332"></a>00332 <a name="l00338"></a>00338 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLight.html#918b1a75d0c515a563ff1c15a1011654" title="Set radial cutoff distance for directional lights.">SetDirectionalCutoffRadius</a> (<span class="keywordtype">float</span> radius) = 0; <a name="l00339"></a>00339 <a name="l00343"></a>00343 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLight.html#efb36d3a82ae8b0d9f724548fc133755" title="Set spot light falloff angles.">SetSpotLightFalloff</a> (<span class="keywordtype">float</span> inner, <span class="keywordtype">float</span> outer) = 0; <a name="l00344"></a>00344 <a name="l00348"></a>00348 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLight.html#ea9928e5d2b077a1c84eb87c3c7a7652" title="Get spot light falloff angles.">GetSpotLightFalloff</a> (<span class="keywordtype">float</span>& inner, <span class="keywordtype">float</span>& outer) <span class="keyword">const</span> = 0; <a name="l00349"></a>00349 <a name="l00351"></a>00351 <span class="keyword">virtual</span> <a class="code" href="structiCrossHalo.html" title="This is a halo which resembles a cross.">iCrossHalo</a>* <a class="code" href="structiLight.html#7b0a965442c072d3c38c55b8fcb1677d" title="Create a cross halo for this light.">CreateCrossHalo</a> (<span class="keywordtype">float</span> intensity, <span class="keywordtype">float</span> cross) = 0; <a name="l00353"></a>00353 <span class="keyword">virtual</span> <a class="code" href="structiNovaHalo.html" title="This is a halo which resembles a nova.">iNovaHalo</a>* <a class="code" href="structiLight.html#318ad770cb38c8f2eaa7ab9ccb86431d" title="Create a nova halo for this light.">CreateNovaHalo</a> (<span class="keywordtype">int</span> seed, <span class="keywordtype">int</span> num_spokes, <a name="l00354"></a>00354 <span class="keywordtype">float</span> roundness) = 0; <a name="l00356"></a>00356 <span class="keyword">virtual</span> <a class="code" href="structiFlareHalo.html" title="This is a halo which resembles a (solar) flare.">iFlareHalo</a>* <a class="code" href="structiLight.html#40daa4717935b67f21689b77a79ce8af" title="Create a flare halo for this light.">CreateFlareHalo</a> () = 0; <a name="l00357"></a>00357 <a name="l00359"></a>00359 <span class="keyword">virtual</span> <a class="code" href="structiBaseHalo.html" title="This is the basic interface for all types of halos.">iBaseHalo</a>* <a class="code" href="structiLight.html#2605337f152470b28aca23e72f349234" title="Return the associated halo.">GetHalo</a> () <span class="keyword">const</span> = 0; <a name="l00360"></a>00360 <a name="l00362"></a>00362 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="structiLight.html#9592940f8eb427f0bb832adc22483d3e" title="Get the brightness of a light at a given distance.">GetBrightnessAtDistance</a> (<span class="keywordtype">float</span> d) <span class="keyword">const</span> = 0; <a name="l00363"></a>00363 <a name="l00369"></a>00369 <span class="keyword">virtual</span> <a class="code" href="classcsFlags.html" title="Set of flags which can be accessed through masks.">csFlags</a>& <a class="code" href="structiLight.html#aec674ec3b973991cdf9c8d5fa41d4b8" title="Get flags for this light.">GetFlags</a> () = 0; <a name="l00370"></a>00370 <a name="l00375"></a>00375 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLight.html#b565f39e0f1fcff515dce9bbec180a33" title="Set the light callback.">SetLightCallback</a> (<a class="code" href="structiLightCallback.html" title="Set a callback which is called when this light color is changed.">iLightCallback</a>* cb) = 0; <a name="l00376"></a>00376 <a name="l00380"></a>00380 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLight.html#ea27011354cce92ed56bf5228201af7f" title="Remove a light callback.">RemoveLightCallback</a> (<a class="code" href="structiLightCallback.html" title="Set a callback which is called when this light color is changed.">iLightCallback</a>* cb) = 0; <a name="l00381"></a>00381 <a name="l00383"></a>00383 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiLight.html#34d999cb6f4955abd156356a7d1efa2c" title="Get the number of light callbacks.">GetLightCallbackCount</a> () <span class="keyword">const</span> = 0; <a name="l00384"></a>00384 <a name="l00386"></a>00386 <span class="keyword">virtual</span> <a class="code" href="structiLightCallback.html" title="Set a callback which is called when this light color is changed.">iLightCallback</a>* <a class="code" href="structiLight.html#cd34a2c891c4f597d516f966909b9b90" title="Get the specified light callback.">GetLightCallback</a> (<span class="keywordtype">int</span> idx) <span class="keyword">const</span> = 0; <a name="l00387"></a>00387 <a name="l00392"></a>00392 <span class="keyword">virtual</span> <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> <a class="code" href="structiLight.html#74db28979d353c53bfa1ceb0dd26173b" title="Return a number that changes when the light changes (color, or position).">GetLightNumber</a> () <span class="keyword">const</span> = 0; <a name="l00393"></a>00393 <a name="l00399"></a>00399 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLight.html#6fba55d11b36aa5a4e34c29e7d29c34c" title="Add a mesh to this light.">AddAffectedLightingInfo</a> (<a class="code" href="structiLightingInfo.html" title="This interface is implemented by mesh objects that have some kind of lighting system...">iLightingInfo</a>* li) = 0; <a name="l00400"></a>00400 <a name="l00404"></a>00404 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLight.html#e15d37f25022c27f37c78b673dc87f87" title="Remove a mesh from this light.">RemoveAffectedLightingInfo</a> (<a class="code" href="structiLightingInfo.html" title="This interface is implemented by mesh objects that have some kind of lighting system...">iLightingInfo</a>* li) = 0; <a name="l00405"></a>00405 <a name="l00410"></a>00410 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLight.html#d43dbef5c28560a3a15333e1bbbe338f" title="For a dynamic light you need to call this to do the actual lighting calculations...">Setup</a> () = 0; <a name="l00411"></a>00411 <a name="l00415"></a>00415 <span class="keyword">virtual</span> <a class="code" href="structiShaderVariableContext.html" title="This is a baseclass for all interfaces which provides shadervariables both dynamically...">iShaderVariableContext</a>* <a class="code" href="structiLight.html#89dcf8ff701aabf508ce2bb4aa97804e" title="Get the shader variable context of the light.">GetSVContext</a>() = 0; <a name="l00416"></a>00416 }; <a name="l00417"></a>00417 <a name="l00427"></a><a class="code" href="structiLightList.html">00427</a> <span class="keyword">struct </span><a class="code" href="structiLightList.html" title="This structure represents a list of lights.">iLightList</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one...">iBase</a> <a name="l00428"></a>00428 { <a name="l00429"></a>00429 SCF_INTERFACE(<a class="code" href="structiLightList.html" title="This structure represents a list of lights.">iLightList</a>,2,0,0); <a name="l00431"></a>00431 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiLightList.html#dcbf6adf171370abd54b1988d93a10b2" title="Return the number of lights in this list.">GetCount</a> () <span class="keyword">const</span> = 0; <a name="l00432"></a>00432 <a name="l00434"></a>00434 <span class="keyword">virtual</span> <a class="code" href="structiLight.html" title="The iLight interface is the SCF interface for the csLight class.">iLight</a> *<a class="code" href="structiLightList.html#e41513babb272603006e792ef2179298" title="Return a light by index.">Get</a> (<span class="keywordtype">int</span> n) <span class="keyword">const</span> = 0; <a name="l00435"></a>00435 <a name="l00437"></a>00437 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiLightList.html#fd33dee443a911ad6925c89a98504a4d" title="Add a light.">Add</a> (<a class="code" href="structiLight.html" title="The iLight interface is the SCF interface for the csLight class.">iLight</a> *obj) = 0; <a name="l00438"></a>00438 <a name="l00440"></a>00440 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiLightList.html#dce9caadeb8f791d8a80838d5ce751ad" title="Remove a light.">Remove</a> (<a class="code" href="structiLight.html" title="The iLight interface is the SCF interface for the csLight class.">iLight</a> *obj) = 0; <a name="l00441"></a>00441 <a name="l00443"></a>00443 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiLightList.html#dce9caadeb8f791d8a80838d5ce751ad" title="Remove a light.">Remove</a> (<span class="keywordtype">int</span> n) = 0; <a name="l00444"></a>00444 <a name="l00446"></a>00446 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLightList.html#d85cc15ab4bea27f2e000eac0f43cef1" title="Remove all lights.">RemoveAll</a> () = 0; <a name="l00447"></a>00447 <a name="l00449"></a>00449 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiLightList.html#f746f2affffdfe64bef7a524437eee49" title="Find a light and return its index.">Find</a> (<a class="code" href="structiLight.html" title="The iLight interface is the SCF interface for the csLight class.">iLight</a> *obj) <span class="keyword">const</span> = 0; <a name="l00450"></a>00450 <a name="l00452"></a>00452 <span class="keyword">virtual</span> <a class="code" href="structiLight.html" title="The iLight interface is the SCF interface for the csLight class.">iLight</a> *<a class="code" href="structiLightList.html#2aa7a4ce6e8875562f58006014eb1028" title="Find a light by name.">FindByName</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Name) <span class="keyword">const</span> = 0; <a name="l00453"></a>00453 <a name="l00455"></a>00455 <span class="keyword">virtual</span> <a class="code" href="structiLight.html" title="The iLight interface is the SCF interface for the csLight class.">iLight</a> *<a class="code" href="structiLightList.html#baa54383803df4d10fbffe6bde01e083" title="Find a light by its ID value (16-byte MD5).">FindByID</a> (<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keywordtype">id</span>) <span class="keyword">const</span> = 0; <a name="l00456"></a>00456 }; <a name="l00457"></a>00457 <a name="l00463"></a><a class="code" href="structiLightingProcessData.html">00463</a> <span class="keyword">struct </span><a class="code" href="structiLightingProcessData.html" title="The iLightingProcessData interface can be implemented by a mesh object so that it...">iLightingProcessData</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one...">iBase</a> <a name="l00464"></a>00464 { <a name="l00465"></a>00465 SCF_INTERFACE (<a class="code" href="structiLightingProcessData.html" title="The iLightingProcessData interface can be implemented by a mesh object so that it...">iLightingProcessData</a>, 1, 0, 0); <a name="l00466"></a>00466 <a name="l00471"></a>00471 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLightingProcessData.html#ebc9b72e37bce14784c82abf6b2d91a5" title="Finalize lighting.">FinalizeLighting</a> () = 0; <a name="l00472"></a>00472 }; <a name="l00473"></a>00473 <a name="l00480"></a><a class="code" href="structiLightingProcessInfo.html">00480</a> <span class="keyword">struct </span><a class="code" href="structiLightingProcessInfo.html" title="The iLightingProcessInfo interface holds information for the lighting system.">iLightingProcessInfo</a> : <span class="keyword">public</span> <a class="code" href="structiFrustumViewUserdata.html" title="User data which can be attached to iFrustumView.">iFrustumViewUserdata</a> <a name="l00481"></a>00481 { <a name="l00482"></a>00482 SCF_INTERFACE(<a class="code" href="structiLightingProcessInfo.html" title="The iLightingProcessInfo interface holds information for the lighting system.">iLightingProcessInfo</a>,2,0,0); <a name="l00484"></a>00484 <span class="keyword">virtual</span> <a class="code" href="structiLight.html" title="The iLight interface is the SCF interface for the csLight class.">iLight</a>* <a class="code" href="structiLightingProcessInfo.html#622fb22c5355ecc46676a69730550501" title="Get the light.">GetLight</a> () <span class="keyword">const</span> = 0; <a name="l00485"></a>00485 <a name="l00487"></a>00487 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiLightingProcessInfo.html#502bb78126f46ae8dfa2a35dd1034366" title="Return true if dynamic.">IsDynamic</a> () <span class="keyword">const</span> = 0; <a name="l00488"></a>00488 <a name="l00490"></a>00490 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLightingProcessInfo.html#1d81d35ca1084d53a95c4dec904d92a9" title="Set the current color.">SetColor</a> (<span class="keyword">const</span> <a class="code" href="classcsColor.html" title="A class used to represent a color in RGB space.">csColor</a>& col) = 0; <a name="l00491"></a>00491 <a name="l00493"></a>00493 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classcsColor.html" title="A class used to represent a color in RGB space.">csColor</a>& <a class="code" href="structiLightingProcessInfo.html#f32e1a3f3763ff7832d805bc2d87c197" title="Get the current color.">GetColor</a> () <span class="keyword">const</span> = 0; <a name="l00494"></a>00494 <a name="l00500"></a>00500 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLightingProcessInfo.html#4e3201bb36b47ee2948779f7dd75a31a" title="Attach some userdata to the process info.">AttachUserdata</a> (<a class="code" href="structiLightingProcessData.html" title="The iLightingProcessData interface can be implemented by a mesh object so that it...">iLightingProcessData</a>* userdata) = 0; <a name="l00501"></a>00501 <a name="l00505"></a>00505 <span class="keyword">virtual</span> <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr<iLightingProcessData></a> <a class="code" href="structiLightingProcessInfo.html#c6c207be3fa79b1a256155c5537feebf" title="Query for userdata based on SCF type.">QueryUserdata</a> (<a class="code" href="group__scf.html#ge3095ac94f71a5ff42374271c90222cd" title="Type of registered interface handle used by iBase::QueryInterface().">scfInterfaceID</a> <span class="keywordtype">id</span>, <a name="l00506"></a>00506 <span class="keywordtype">int</span> version) = 0; <a name="l00507"></a>00507 <a name="l00513"></a>00513 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLightingProcessInfo.html#b8bf55a73cb9495b18034285647342c7" title="Finalize lighting.">FinalizeLighting</a> () = 0; <a name="l00514"></a>00514 }; <a name="l00515"></a>00515 <a name="l00528"></a><a class="code" href="structiLightIterator.html">00528</a> <span class="keyword">struct </span><a class="code" href="structiLightIterator.html" title="Iterator to iterate over all static lights in the engine.">iLightIterator</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one...">iBase</a> <a name="l00529"></a>00529 { <a name="l00530"></a>00530 SCF_INTERFACE (<a class="code" href="structiLightIterator.html" title="Iterator to iterate over all static lights in the engine.">iLightIterator</a>, 0, 1, 0); <a name="l00531"></a>00531 <a name="l00533"></a>00533 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiLightIterator.html#ec162179920a2409f45453e850068675" title="Return true if there are more elements.">HasNext</a> () = 0; <a name="l00534"></a>00534 <a name="l00536"></a>00536 <span class="keyword">virtual</span> <a class="code" href="structiLight.html" title="The iLight interface is the SCF interface for the csLight class.">iLight</a>* <a class="code" href="structiLightIterator.html#21ec8842a268adb480ffc06106b3854a" title="Get light from iterator. Return 0 at end.">Next</a> () = 0; <a name="l00537"></a>00537 <a name="l00539"></a>00539 <span class="keyword">virtual</span> <a class="code" href="structiSector.html" title="The iSector interface is used to work with &quot;sectors&quot;.">iSector</a>* <a class="code" href="structiLightIterator.html#c2f7d9118723f2f40f8ccda6dc14b547" title="Get the sector for the last fetched light.">GetLastSector</a> () = 0; <a name="l00540"></a>00540 <a name="l00542"></a>00542 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiLightIterator.html#3862094058dc45d7ecebcb3a04d30fa1" title="Restart iterator.">Reset</a> () = 0; <a name="l00543"></a>00543 <a name="l00544"></a>00544 }; <a name="l00545"></a>00545 <a name="l00548"></a>00548 <span class="preprocessor">#endif // __CS_IENGINE_LIGHT_H__</span> <a name="l00549"></a>00549 <span class="preprocessor"></span> </pre></div><hr size="1"><address><small>Generated for Crystal Space 1.2.1 by <a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 </small></address> </div></body> </html>