source: GTP/trunk/App/Demos/Illum/Rain/docs/html/RainLight_8h-source.html @ 2221

Revision 2221, 7.5 KB checked in by plemenos, 18 years ago (diff)
  • Property svn:executable set to *
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3<title>gametools-rain: RainLight.h Source File</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5<link href="tabs.css" rel="stylesheet" type="text/css">
6</head><body>
7<!-- Generated by Doxygen 1.4.6 -->
8<div class="tabs">
9  <ul>
10    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
11    <li><a href="annotated.html"><span>Classes</span></a></li>
12    <li id="current"><a href="files.html"><span>Files</span></a></li>
13  </ul></div>
14<h1>RainLight.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
15<a name="l00003"></a>00003 <span class="comment">//</span>
16<a name="l00004"></a>00004 <span class="comment">//              Realistic rain real-time simulation program</span>
17<a name="l00005"></a>00005 <span class="comment">//</span>
18<a name="l00006"></a>00006 <span class="comment">//              Pierre Rousseau</span>
19<a name="l00007"></a>00007 <span class="comment">//</span>
20<a name="l00009"></a>00009 <span class="comment"></span><span class="comment">//</span>
21<a name="l00010"></a>00010 <span class="comment">//              Light Handling</span>
22<a name="l00011"></a>00011 <span class="comment">//</span>
23<a name="l00013"></a>00013 <span class="comment"></span>
24<a name="l00014"></a>00014
25<a name="l00015"></a>00015 <span class="preprocessor">#ifndef __RAIN_LIGHT__</span>
26<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#define __RAIN_LIGHT__</span>
27<a name="l00017"></a>00017 <span class="preprocessor"></span>
28<a name="l00018"></a>00018
29<a name="l00019"></a>00019
30<a name="l00020"></a>00020 <span class="preprocessor">#include "CommonRain.h"</span>
31<a name="l00021"></a>00021 <span class="preprocessor">#include "ExampleApplication.h"</span>
32<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;vector&gt;</span>
33<a name="l00023"></a>00023
34<a name="l00024"></a>00024
35<a name="l00025"></a>00025
36<a name="l00026"></a>00026
37<a name="l00030"></a><a class="code" href="classRainLight.html">00030</a> <span class="keyword">class </span><a class="code" href="classRainLight.html">RainLight</a>
38<a name="l00031"></a>00031 {
39<a name="l00032"></a>00032 <span class="keyword">private</span> :
40<a name="l00033"></a>00033     SceneManager *mSceneMgr;
41<a name="l00034"></a>00034     SceneNode *mLightNode;
42<a name="l00035"></a>00035     SceneNode *mConeNode;
43<a name="l00036"></a>00036     BillboardSet *mBillboardSet;
44<a name="l00037"></a>00037     Billboard *mBillboard;
45<a name="l00038"></a>00038
46<a name="l00039"></a>00039     ColourValue mColour;
47<a name="l00040"></a>00040     Vector3 mLightPos, mLightInitialPos, mLightDir;
48<a name="l00041"></a>00041 <span class="keywordtype">float</span> mLightCutoff, mLightAttenuation;
49<a name="l00042"></a>00042 <span class="keywordtype">bool</span> isAnimated;
50<a name="l00043"></a>00043
51<a name="l00044"></a>00044
52<a name="l00045"></a>00045 <span class="keywordtype">float</span> stepH1, stepH2, stepH3, stepV1, stepV2;
53<a name="l00046"></a>00046 <span class="keywordtype">float</span> h1, h2, h3;
54<a name="l00047"></a>00047 <span class="keywordtype">float</span> v1, v2;
55<a name="l00048"></a>00048
56<a name="l00049"></a>00049 <span class="keyword">public</span> :
57<a name="l00051"></a>00051 <a class="code" href="classRainLight.html#3f7303451d4241cba55324c9eeb7ef00">RainLight</a>(SceneManager *sceneMgr, <span class="keywordtype">int</span> lightNumber = 0, ColourValue col = ColourValue::Red, Vector3 LightPos = Vector3(0, 0, 0), <span class="keywordtype">float</span> LightAttenuation = 150);
58<a name="l00052"></a>00052
59<a name="l00053"></a>00053 <span class="keywordtype">void</span> animate();
60<a name="l00054"></a>00054
61<a name="l00055"></a>00055     ColourValue getColour()
62<a name="l00056"></a>00056     {
63<a name="l00057"></a>00057 <span class="keywordflow">return</span> mColour;
64<a name="l00058"></a>00058     }
65<a name="l00059"></a>00059
66<a name="l00060"></a>00060     Vector3 getPosition()
67<a name="l00061"></a>00061     {
68<a name="l00062"></a>00062 <span class="keywordflow">return</span> mLightPos;
69<a name="l00063"></a>00063     }
70<a name="l00064"></a>00064
71<a name="l00065"></a>00065     Vector3 getDirection()
72<a name="l00066"></a>00066     {
73<a name="l00067"></a>00067 <span class="keywordflow">return</span> mLightDir;
74<a name="l00068"></a>00068     }
75<a name="l00069"></a>00069
76<a name="l00070"></a>00070 <span class="keywordtype">float</span> getCutoff()
77<a name="l00071"></a>00071     {
78<a name="l00072"></a>00072 <span class="keywordflow">return</span> mLightCutoff;
79<a name="l00073"></a>00073     }
80<a name="l00074"></a>00074
81<a name="l00075"></a>00075 <span class="keywordtype">float</span> getAttenuation()
82<a name="l00076"></a>00076     {
83<a name="l00077"></a>00077 <span class="keywordflow">return</span> mLightAttenuation;
84<a name="l00078"></a>00078     }
85<a name="l00079"></a>00079
86<a name="l00080"></a>00080 <span class="keywordtype">bool</span> getIsAnimated()
87<a name="l00081"></a>00081     {
88<a name="l00082"></a>00082 <span class="keywordflow">return</span> isAnimated;
89<a name="l00083"></a>00083     }
90<a name="l00084"></a>00084
91<a name="l00085"></a>00085 };
92<a name="l00086"></a>00086
93<a name="l00087"></a>00087
94<a name="l00088"></a>00088
95<a name="l00089"></a>00089 <span class="keyword">class </span>RainLightManager
96<a name="l00090"></a>00090 {
97<a name="l00091"></a>00091 <span class="keyword">private</span> :
98<a name="l00092"></a>00092 <span class="keywordtype">int</span> lightCount;
99<a name="l00093"></a>00093     std::vector&lt;RainLight *&gt; lightVector;
100<a name="l00094"></a>00094     SceneManager *mSceneMgr;
101<a name="l00095"></a>00095
102<a name="l00096"></a>00096 <span class="keyword">public</span> :
103<a name="l00097"></a>00097     RainLightManager(SceneManager *sceneMgr);
104<a name="l00098"></a>00098
105<a name="l00099"></a>00099     ~RainLightManager();
106<a name="l00100"></a>00100
107<a name="l00101"></a>00101 <span class="keywordtype">int</span> getLightCount()
108<a name="l00102"></a>00102     {
109<a name="l00103"></a>00103 <span class="keywordflow">return</span> lightCount;
110<a name="l00104"></a>00104     }
111<a name="l00105"></a>00105
112<a name="l00106"></a>00106 <span class="keywordtype">void</span> addStreetLight(ColourValue col = ColourValue::Red + ColourValue::Green + ColourValue::Blue, Vector3 LightPos = Vector3(0, 0, 0), <span class="keywordtype">float</span> LightAttenuation = 150);
113<a name="l00107"></a>00107
114<a name="l00109"></a>00109 <span class="keywordtype">void</span> createLightInfoTexture();
115<a name="l00110"></a>00110
116<a name="l00111"></a>00111 <span class="keywordtype">void</span> updateLightInfoTexture();
117<a name="l00112"></a>00112
118<a name="l00113"></a>00113 <span class="keywordtype">void</span> updateLights();
119<a name="l00114"></a>00114
120<a name="l00115"></a>00115 <span class="keywordtype">void</span> finalizeLights();
121<a name="l00116"></a>00116 };
122<a name="l00117"></a>00117
123<a name="l00118"></a>00118 <span class="preprocessor">#endif // __RAIN_LIGHT__</span>
124<a name="l00119"></a>00119 <span class="preprocessor"></span>
125</pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed May 17 16:55:30 2006 for gametools-rain by&nbsp;
126<a href="http://www.doxygen.org/index.html">
127<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
128</body>
129</html>
Note: See TracBrowser for help on using the repository browser.