1 | <html> |
---|
2 | <head> |
---|
3 | <title>OgreLight.h Source File - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
4 | <link type="text/css" rel="stylesheet" href="style.css"> |
---|
5 | </head> |
---|
6 | |
---|
7 | <body> |
---|
8 | <!-- Generated by Doxygen 1.3.6 --> |
---|
9 | <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div> |
---|
10 | <h1>OgreLight.h</h1><a href="OgreLight_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span> |
---|
11 | 00002 <span class="comment">-----------------------------------------------------------------------------</span> |
---|
12 | 00003 <span class="comment">This source file is part of OGRE</span> |
---|
13 | 00004 <span class="comment"> (Object-oriented Graphics Rendering Engine)</span> |
---|
14 | 00005 <span class="comment">For the latest info, see http://www.ogre3d.org/</span> |
---|
15 | 00006 <span class="comment"></span> |
---|
16 | 00007 <span class="comment">Copyright (c) 2000-2005 The OGRE Team</span> |
---|
17 | 00008 <span class="comment">Also see acknowledgements in Readme.html</span> |
---|
18 | 00009 <span class="comment"></span> |
---|
19 | 00010 <span class="comment">This program is free software; you can redistribute it and/or modify it under</span> |
---|
20 | 00011 <span class="comment">the terms of the GNU Lesser General Public License as published by the Free Software</span> |
---|
21 | 00012 <span class="comment">Foundation; either version 2 of the License, or (at your option) any later</span> |
---|
22 | 00013 <span class="comment">version.</span> |
---|
23 | 00014 <span class="comment"></span> |
---|
24 | 00015 <span class="comment">This program is distributed in the hope that it will be useful, but WITHOUT</span> |
---|
25 | 00016 <span class="comment">ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span> |
---|
26 | 00017 <span class="comment">FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</span> |
---|
27 | 00018 <span class="comment"></span> |
---|
28 | 00019 <span class="comment">You should have received a copy of the GNU Lesser General Public License along with</span> |
---|
29 | 00020 <span class="comment">this program; if not, write to the Free Software Foundation, Inc., 59 Temple</span> |
---|
30 | 00021 <span class="comment">Place - Suite 330, Boston, MA 02111-1307, USA, or go to</span> |
---|
31 | 00022 <span class="comment">http://www.gnu.org/copyleft/lesser.txt.</span> |
---|
32 | 00023 <span class="comment">-----------------------------------------------------------------------------</span> |
---|
33 | 00024 <span class="comment">*/</span> |
---|
34 | 00025 <span class="preprocessor">#ifndef _LIGHT_H__</span> |
---|
35 | 00026 <span class="preprocessor"></span><span class="preprocessor">#define _LIGHT_H__</span> |
---|
36 | 00027 <span class="preprocessor"></span> |
---|
37 | 00028 <span class="preprocessor">#include "<a class="code" href="OgrePrerequisites_8h.html">OgrePrerequisites.h</a>"</span> |
---|
38 | 00029 |
---|
39 | 00030 <span class="preprocessor">#include "<a class="code" href="OgreColourValue_8h.html">OgreColourValue.h</a>"</span> |
---|
40 | 00031 <span class="preprocessor">#include "<a class="code" href="OgreVector3_8h.html">OgreVector3.h</a>"</span> |
---|
41 | 00032 <span class="preprocessor">#include "<a class="code" href="OgreVector4_8h.html">OgreVector4.h</a>"</span> |
---|
42 | 00033 <span class="preprocessor">#include "<a class="code" href="OgreString_8h.html">OgreString.h</a>"</span> |
---|
43 | 00034 <span class="preprocessor">#include "<a class="code" href="OgreMovableObject_8h.html">OgreMovableObject.h</a>"</span> |
---|
44 | 00035 <span class="preprocessor">#include "<a class="code" href="OgrePlaneBoundedVolume_8h.html">OgrePlaneBoundedVolume.h</a>"</span> |
---|
45 | 00036 |
---|
46 | 00037 <span class="keyword">namespace </span>Ogre { |
---|
47 | 00038 |
---|
48 | 00039 |
---|
49 | <a name="l00062"></a><a class="code" href="classOgre_1_1Light.html">00062</a> <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a16">_OgreExport</a> Light : <span class="keyword">public</span> <a class="code" href="classOgre_1_1MovableObject.html">MovableObject</a> |
---|
50 | 00063 { |
---|
51 | 00064 <span class="keyword">public</span>: |
---|
52 | <a name="l00066"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lighto0">00066</a> <a class="code" href="namespaceOgre.html#a420">Real</a> tempSquareDist; |
---|
53 | 00067 |
---|
54 | <a name="l00069"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightw3">00069</a> <span class="keyword">enum</span> LightTypes |
---|
55 | 00070 { |
---|
56 | 00072 LT_POINT, |
---|
57 | 00074 LT_DIRECTIONAL, |
---|
58 | 00076 LT_SPOTLIGHT |
---|
59 | 00077 }; |
---|
60 | 00078 |
---|
61 | 00081 Light(); |
---|
62 | 00082 |
---|
63 | 00085 Light(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& name); |
---|
64 | 00086 |
---|
65 | 00089 ~Light(); |
---|
66 | 00090 |
---|
67 | 00093 <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& getName(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
68 | 00094 |
---|
69 | 00097 <span class="keywordtype">void</span> setType(LightTypes type); |
---|
70 | 00098 |
---|
71 | 00101 LightTypes getType(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
72 | 00102 |
---|
73 | 00112 <span class="keywordtype">void</span> setDiffuseColour(<a class="code" href="namespaceOgre.html#a420">Real</a> red, <a class="code" href="namespaceOgre.html#a420">Real</a> green, <a class="code" href="namespaceOgre.html#a420">Real</a> blue); |
---|
74 | 00113 |
---|
75 | 00123 <span class="keywordtype">void</span> setDiffuseColour(<span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>& colour); |
---|
76 | 00124 |
---|
77 | 00127 <span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>& getDiffuseColour(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
78 | 00128 |
---|
79 | 00138 <span class="keywordtype">void</span> setSpecularColour(<a class="code" href="namespaceOgre.html#a420">Real</a> red, <a class="code" href="namespaceOgre.html#a420">Real</a> green, <a class="code" href="namespaceOgre.html#a420">Real</a> blue); |
---|
80 | 00139 |
---|
81 | 00149 <span class="keywordtype">void</span> setSpecularColour(<span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>& colour); |
---|
82 | 00150 |
---|
83 | 00153 <span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>& getSpecularColour(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
84 | 00154 |
---|
85 | 00174 <span class="keywordtype">void</span> setAttenuation(<a class="code" href="namespaceOgre.html#a420">Real</a> range, <a class="code" href="namespaceOgre.html#a420">Real</a> constant, <a class="code" href="namespaceOgre.html#a420">Real</a> linear, <a class="code" href="namespaceOgre.html#a420">Real</a> quadratic); |
---|
86 | 00175 |
---|
87 | 00178 <a class="code" href="namespaceOgre.html#a420">Real</a> getAttenuationRange(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
88 | 00179 |
---|
89 | 00182 <a class="code" href="namespaceOgre.html#a420">Real</a> getAttenuationConstant(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
90 | 00183 |
---|
91 | 00186 <a class="code" href="namespaceOgre.html#a420">Real</a> getAttenuationLinear(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
92 | 00187 |
---|
93 | 00190 <a class="code" href="namespaceOgre.html#a420">Real</a> getAttenuationQuadric(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
94 | 00191 |
---|
95 | 00198 <span class="keywordtype">void</span> setPosition(<a class="code" href="namespaceOgre.html#a420">Real</a> x, <a class="code" href="namespaceOgre.html#a420">Real</a> y, <a class="code" href="namespaceOgre.html#a420">Real</a> z); |
---|
96 | 00199 |
---|
97 | 00206 <span class="keywordtype">void</span> setPosition(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& vec); |
---|
98 | 00207 |
---|
99 | 00212 <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& getPosition(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
100 | 00213 |
---|
101 | 00220 <span class="keywordtype">void</span> setDirection(<a class="code" href="namespaceOgre.html#a420">Real</a> x, <a class="code" href="namespaceOgre.html#a420">Real</a> y, <a class="code" href="namespaceOgre.html#a420">Real</a> z); |
---|
102 | 00221 |
---|
103 | 00228 <span class="keywordtype">void</span> setDirection(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& vec); |
---|
104 | 00229 |
---|
105 | 00234 <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& getDirection(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
106 | 00235 |
---|
107 | 00246 <span class="keywordtype">void</span> setSpotlightRange(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& innerAngle, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& outerAngle, <a class="code" href="namespaceOgre.html#a420">Real</a> falloff = 1.0); |
---|
108 | 00247 <span class="preprocessor">#ifndef OGRE_FORCE_ANGLE_TYPES</span> |
---|
109 | 00248 <span class="preprocessor"></span> <span class="keyword">inline</span> <span class="keywordtype">void</span> setSpotlightRange(<a class="code" href="namespaceOgre.html#a420">Real</a> innerAngle, <a class="code" href="namespaceOgre.html#a420">Real</a> outerAngle, <a class="code" href="namespaceOgre.html#a420">Real</a> falloff = 1.0) { |
---|
110 | 00249 setSpotlightRange ( <a class="code" href="classOgre_1_1Angle.html">Angle</a>(innerAngle), <a class="code" href="classOgre_1_1Angle.html">Angle</a>(outerAngle), falloff ); |
---|
111 | 00250 } |
---|
112 | 00251 <span class="preprocessor">#endif//OGRE_FORCE_ANGLE_TYPES</span> |
---|
113 | 00252 <span class="preprocessor"></span> |
---|
114 | 00255 <span class="keyword">const</span> Radian& getSpotlightInnerAngle(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
115 | 00256 |
---|
116 | 00259 <span class="keyword">const</span> Radian& getSpotlightOuterAngle(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
117 | 00260 |
---|
118 | 00263 <a class="code" href="namespaceOgre.html#a420">Real</a> getSpotlightFalloff(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
119 | 00264 |
---|
120 | 00266 <span class="keywordtype">void</span> _notifyCurrentCamera(<a class="code" href="classOgre_1_1Camera.html">Camera</a>* cam); |
---|
121 | 00267 |
---|
122 | 00269 <span class="keyword">const</span> AxisAlignedBox& getBoundingBox(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
123 | 00270 |
---|
124 | 00272 <span class="keywordtype">void</span> _updateRenderQueue(RenderQueue* queue); |
---|
125 | 00273 |
---|
126 | 00275 <span class="keyword">const</span> String& getMovableType(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
127 | 00276 |
---|
128 | 00278 <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& getDerivedPosition(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
129 | 00279 |
---|
130 | 00281 <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& getDerivedDirection(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
131 | 00282 |
---|
132 | 00288 <span class="keywordtype">void</span> setVisible(<span class="keywordtype">bool</span> visible); |
---|
133 | 00289 |
---|
134 | <a name="l00291"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lighta34">00291</a> <a class="code" href="namespaceOgre.html#a420">Real</a> getBoundingRadius(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0; <span class="comment">/* not visible */</span> } |
---|
135 | 00292 |
---|
136 | 00301 <a class="code" href="classOgre_1_1Vector4.html">Vector4</a> getAs4DVector(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
137 | 00302 |
---|
138 | 00312 <span class="keyword">const</span> <a class="code" href="classOgre_1_1PlaneBoundedVolume.html">PlaneBoundedVolume</a>& _getNearClipVolume(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Camera.html">Camera</a>* <span class="keyword">const</span> cam) <span class="keyword">const</span>; |
---|
139 | 00313 |
---|
140 | 00320 <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a411">PlaneBoundedVolumeList</a>& _getFrustumClipVolumes(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Camera.html">Camera</a>* <span class="keyword">const</span> cam) <span class="keyword">const</span>; |
---|
141 | 00321 |
---|
142 | 00322 |
---|
143 | 00323 |
---|
144 | 00324 <span class="keyword">private</span>: |
---|
145 | 00326 <span class="keywordtype">void</span> update(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
146 | <a name="l00327"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr0">00327</a> <a class="code" href="namespaceOgre.html#a426">String</a> mName; |
---|
147 | 00328 |
---|
148 | <a name="l00329"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr1">00329</a> LightTypes mLightType; |
---|
149 | <a name="l00330"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr2">00330</a> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a> mPosition; |
---|
150 | <a name="l00331"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr3">00331</a> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a> mDiffuse; |
---|
151 | <a name="l00332"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr4">00332</a> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a> mSpecular; |
---|
152 | 00333 |
---|
153 | <a name="l00334"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr5">00334</a> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a> mDirection; |
---|
154 | 00335 |
---|
155 | <a name="l00336"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr6">00336</a> <a class="code" href="classOgre_1_1Radian.html">Radian</a> mSpotOuter; |
---|
156 | <a name="l00337"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr7">00337</a> <a class="code" href="classOgre_1_1Radian.html">Radian</a> mSpotInner; |
---|
157 | <a name="l00338"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr8">00338</a> <a class="code" href="namespaceOgre.html#a420">Real</a> mSpotFalloff; |
---|
158 | <a name="l00339"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr9">00339</a> <a class="code" href="namespaceOgre.html#a420">Real</a> mRange; |
---|
159 | <a name="l00340"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr10">00340</a> <a class="code" href="namespaceOgre.html#a420">Real</a> mAttenuationConst; |
---|
160 | <a name="l00341"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr11">00341</a> <a class="code" href="namespaceOgre.html#a420">Real</a> mAttenuationLinear; |
---|
161 | <a name="l00342"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr12">00342</a> <a class="code" href="namespaceOgre.html#a420">Real</a> mAttenuationQuad; |
---|
162 | 00343 |
---|
163 | <a name="l00344"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr13">00344</a> <span class="keyword">mutable</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a> mDerivedPosition; |
---|
164 | <a name="l00345"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr14">00345</a> <span class="keyword">mutable</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a> mDerivedDirection; |
---|
165 | <a name="l00347"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr15">00347</a> <span class="keyword">mutable</span> <a class="code" href="classOgre_1_1Quaternion.html">Quaternion</a> mLastParentOrientation; |
---|
166 | <a name="l00348"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr16">00348</a> <span class="keyword">mutable</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a> mLastParentPosition; |
---|
167 | 00349 |
---|
168 | <a name="l00351"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightv0">00351</a> <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a426">String</a> msMovableType; |
---|
169 | 00352 |
---|
170 | <a name="l00353"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr17">00353</a> <span class="keyword">mutable</span> <a class="code" href="classOgre_1_1PlaneBoundedVolume.html">PlaneBoundedVolume</a> mNearClipVolume; |
---|
171 | <a name="l00354"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr18">00354</a> <span class="keyword">mutable</span> <a class="code" href="namespaceOgre.html#a411">PlaneBoundedVolumeList</a> mFrustumClipVolumes; |
---|
172 | <a name="l00356"></a><a class="code" href="classOgre_1_1Light.html#Ogre_1_1Lightr19">00356</a> <span class="keyword">mutable</span> <span class="keywordtype">bool</span> mLocalTransformDirty; |
---|
173 | 00357 |
---|
174 | 00358 |
---|
175 | 00359 |
---|
176 | 00360 }; |
---|
177 | 00361 } <span class="comment">// Namespace</span> |
---|
178 | 00362 <span class="preprocessor">#endif</span> |
---|
179 | </pre></div><hr> |
---|
180 | <p> |
---|
181 | Copyright © 2000-2005 by The OGRE Team<br /> |
---|
182 | <!--Creative Commons License--><a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.png"/></a><br/> |
---|
183 | This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5 License</a>.<br/> |
---|
184 | <!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> |
---|
185 | <Work rdf:about=""> |
---|
186 | <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" /> |
---|
187 | <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" /> |
---|
188 | </Work> |
---|
189 | <License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> --> |
---|
190 | |
---|
191 | Last modified Sun Feb 12 12:59:47 2006 |
---|
192 | </p> |
---|
193 | </body> |
---|
194 | </html> |
---|