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>FCollada: FCDocument/FCDLight.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-NO --> |
---|
8 | <div class="tabs"> |
---|
9 | <ul> |
---|
10 | <li><a href="index.html"><span>Main Page</span></a></li> |
---|
11 | <li><a href="modules.html"><span>Modules</span></a></li> |
---|
12 | <li><a href="namespaces.html"><span>Namespaces</span></a></li> |
---|
13 | <li><a href="classes.html"><span>Classes</span></a></li> |
---|
14 | <li id="current"><a href="files.html"><span>Files</span></a></li> |
---|
15 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
16 | </ul></div> |
---|
17 | <div class="tabs"> |
---|
18 | <ul> |
---|
19 | <li><a href="files.html"><span>File List</span></a></li> |
---|
20 | <li><a href="globals.html"><span>File Members</span></a></li> |
---|
21 | </ul></div> |
---|
22 | <h1>FCDocument/FCDLight.h</h1><a href="_f_c_d_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> |
---|
23 | <a name="l00002"></a>00002 <span class="comment"> Copyright (C) 2005-2006 Feeling Software Inc.</span> |
---|
24 | <a name="l00003"></a>00003 <span class="comment"> MIT License: http://www.opensource.org/licenses/mit-license.php</span> |
---|
25 | <a name="l00004"></a>00004 <span class="comment">*/</span> |
---|
26 | <a name="l00005"></a>00005 <span class="comment">/*</span> |
---|
27 | <a name="l00006"></a>00006 <span class="comment"> Based on the FS Import classes:</span> |
---|
28 | <a name="l00007"></a>00007 <span class="comment"> Copyright (C) 2005-2006 Feeling Software Inc</span> |
---|
29 | <a name="l00008"></a>00008 <span class="comment"> Copyright (C) 2005-2006 Autodesk Media Entertainment</span> |
---|
30 | <a name="l00009"></a>00009 <span class="comment"> MIT License: http://www.opensource.org/licenses/mit-license.php</span> |
---|
31 | <a name="l00010"></a>00010 <span class="comment">*/</span> |
---|
32 | <a name="l00011"></a>00011 |
---|
33 | <a name="l00017"></a>00017 <span class="preprocessor">#ifndef _FCD_LIGHT_H_</span> |
---|
34 | <a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define _FCD_LIGHT_H_</span> |
---|
35 | <a name="l00019"></a>00019 <span class="preprocessor"></span> |
---|
36 | <a name="l00020"></a>00020 <span class="preprocessor">#include "<a class="code" href="_f_c_d_targeted_entity_8h.html">FCDocument/FCDTargetedEntity.h</a>"</span> |
---|
37 | <a name="l00021"></a>00021 <span class="preprocessor">#include "FUtils/FUDaeEnum.h"</span> |
---|
38 | <a name="l00022"></a>00022 |
---|
39 | <a name="l00023"></a>00023 <span class="keyword">class </span><a class="code" href="class_f_c_document.html">FCDocument</a>; |
---|
40 | <a name="l00024"></a>00024 <span class="keyword">class </span><a class="code" href="class_f_c_d_scene_node.html">FCDSceneNode</a>; |
---|
41 | <a name="l00025"></a>00025 |
---|
42 | <a name="l00053"></a><a class="code" href="class_f_c_d_light.html">00053</a> <span class="keyword">class </span>FCOLLADA_EXPORT <a class="code" href="class_f_c_d_light.html">FCDLight</a> : <span class="keyword">public</span> <a class="code" href="class_f_c_d_targeted_entity.html">FCDTargetedEntity</a> |
---|
43 | <a name="l00054"></a>00054 { |
---|
44 | <a name="l00055"></a>00055 <span class="keyword">public</span>: |
---|
45 | <a name="l00057"></a><a class="code" href="class_f_c_d_light.html#358eac688b4a74aa90531e5206e92e60">00057</a> <span class="keyword">enum</span> <a class="code" href="class_f_c_d_light.html#358eac688b4a74aa90531e5206e92e60">LightType</a> |
---|
46 | <a name="l00058"></a>00058 { |
---|
47 | <a name="l00059"></a>00059 POINT, |
---|
48 | <a name="l00060"></a>00060 SPOT, |
---|
49 | <a name="l00061"></a>00061 AMBIENT, |
---|
50 | <a name="l00062"></a><a class="code" href="class_f_c_d_light.html#358eac688b4a74aa90531e5206e92e6007c34b01d651ace906e59ff728a8112d">00062</a> DIRECTIONAL |
---|
51 | <a name="l00063"></a>00063 }; |
---|
52 | <a name="l00064"></a>00064 |
---|
53 | <a name="l00065"></a>00065 <span class="keyword">private</span>: |
---|
54 | <a name="l00066"></a>00066 <a class="code" href="_f_u_object_type_8h.html#8124b8a8706cd10260f8cd5a7bd8e691">DeclareObjectType</a>; |
---|
55 | <a name="l00067"></a>00067 |
---|
56 | <a name="l00068"></a>00068 <span class="comment">// Common Light parameters</span> |
---|
57 | <a name="l00069"></a>00069 <a class="code" href="class_f_m_vector3.html">FMVector3</a> color; |
---|
58 | <a name="l00070"></a>00070 <span class="keywordtype">float</span> intensity; <span class="comment">// Max and Maya</span> |
---|
59 | <a name="l00071"></a>00071 LightType lightType; |
---|
60 | <a name="l00072"></a>00072 |
---|
61 | <a name="l00073"></a>00073 <span class="comment">// Point and spot light parameters</span> |
---|
62 | <a name="l00074"></a>00074 <span class="keywordtype">float</span> constantAttenuationFactor; |
---|
63 | <a name="l00075"></a>00075 <span class="keywordtype">float</span> linearAttenuationFactor; |
---|
64 | <a name="l00076"></a>00076 <span class="keywordtype">float</span> quadracticAttenuationFactor; |
---|
65 | <a name="l00077"></a>00077 |
---|
66 | <a name="l00078"></a>00078 <span class="comment">// Spot-specific light parameters</span> |
---|
67 | <a name="l00079"></a>00079 <span class="keywordtype">float</span> fallOffExponent; |
---|
68 | <a name="l00080"></a>00080 <span class="keywordtype">float</span> fallOffAngle; |
---|
69 | <a name="l00081"></a>00081 <span class="keywordtype">float</span> outerAngle; <span class="comment">// Max-specific</span> |
---|
70 | <a name="l00082"></a>00082 <span class="keywordtype">float</span> penumbraAngle; <span class="comment">// Maya-specifc: these last two are are related as 'penumbra = outerAngle - fallOffAngle'.</span> |
---|
71 | <a name="l00083"></a>00083 <span class="keywordtype">float</span> aspectRatio; <span class="comment">// Max-specific, for rectangle lights</span> |
---|
72 | <a name="l00084"></a>00084 <span class="keywordtype">float</span> dropoff; <span class="comment">// Maya-specific</span> |
---|
73 | <a name="l00085"></a>00085 |
---|
74 | <a name="l00086"></a>00086 <span class="comment">// Directional light parameters</span> |
---|
75 | <a name="l00087"></a>00087 <span class="comment">// Overshoot is a Max-specific flag that sets a directional light to cover everything,</span> |
---|
76 | <a name="l00088"></a>00088 <span class="comment">// rather than to be restricted to a cylinder defined by the fallOffAngle/outerAngle.</span> |
---|
77 | <a name="l00089"></a>00089 <span class="keywordtype">bool</span> overshoots; <span class="comment">// Max-specific</span> |
---|
78 | <a name="l00090"></a>00090 |
---|
79 | <a name="l00091"></a>00091 <span class="keyword">public</span>: |
---|
80 | <a name="l00094"></a>00094 <a class="code" href="class_f_c_d_light.html">FCDLight</a>(<a class="code" href="class_f_c_document.html">FCDocument</a>* document); |
---|
81 | <a name="l00095"></a>00095 |
---|
82 | <a name="l00098"></a>00098 <span class="keyword">virtual</span> ~<a class="code" href="class_f_c_d_light.html">FCDLight</a>(); |
---|
83 | <a name="l00099"></a>00099 |
---|
84 | <a name="l00102"></a><a class="code" href="class_f_c_d_light.html#846e07aee92d19dd745a98462a9ffd74">00102</a> <span class="keyword">virtual</span> Type <a class="code" href="class_f_c_d_entity.html#bfd4312a7124f92364c1e6517c7e60ba">GetType</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> LIGHT; } |
---|
85 | <a name="l00103"></a>00103 |
---|
86 | <a name="l00107"></a><a class="code" href="class_f_c_d_light.html#3dccf583871cdc610001b0e682be5c30">00107</a> <a class="code" href="class_f_m_vector3.html">FMVector3</a>& GetColor() { <span class="keywordflow">return</span> color; } |
---|
87 | <a name="l00108"></a><a class="code" href="class_f_c_d_light.html#91cb1bcda652369c066bc58e248ef55c">00108</a> <span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>& GetColor()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> color; } |
---|
88 | <a name="l00113"></a><a class="code" href="class_f_c_d_light.html#e0391538fa3a7e801bf1a67376b99849">00113</a> <span class="keywordtype">void</span> SetColor(<span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>& col) { color = col; } |
---|
89 | <a name="l00114"></a>00114 |
---|
90 | <a name="l00118"></a><a class="code" href="class_f_c_d_light.html#40bbd892b19faa31092dd816b39986b9">00118</a> <span class="keywordtype">float</span>& GetIntensity() { <span class="keywordflow">return</span> intensity; } |
---|
91 | <a name="l00119"></a><a class="code" href="class_f_c_d_light.html#e0fd99526f320f3aa0d30db0cdf9271b">00119</a> <span class="keyword">const</span> <span class="keywordtype">float</span>& GetIntensity()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> intensity; } |
---|
92 | <a name="l00124"></a><a class="code" href="class_f_c_d_light.html#5805489e21bcaa487fe165b1e23c48c9">00124</a> <span class="keywordtype">void</span> SetIntensity(<span class="keywordtype">float</span> _intensity) { intensity = _intensity; } |
---|
93 | <a name="l00125"></a>00125 |
---|
94 | <a name="l00130"></a><a class="code" href="class_f_c_d_light.html#a6a7002af06c8663e083390a8497bc88">00130</a> <a class="code" href="class_f_c_d_light.html#358eac688b4a74aa90531e5206e92e60">LightType</a> GetLightType()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> lightType; } |
---|
95 | <a name="l00131"></a>00131 |
---|
96 | <a name="l00134"></a><a class="code" href="class_f_c_d_light.html#f1d0df3b52fd2bc9d19ccc9f7e8f1b2b">00134</a> <span class="keywordtype">void</span> SetLightType(<a class="code" href="class_f_c_d_light.html#358eac688b4a74aa90531e5206e92e60">LightType</a> type) { lightType = type; } |
---|
97 | <a name="l00135"></a>00135 |
---|
98 | <a name="l00139"></a><a class="code" href="class_f_c_d_light.html#93baf46fe53050713d2ab0164b171cb3">00139</a> <span class="keywordtype">float</span>& GetConstantAttenuationFactor() { <span class="keywordflow">return</span> constantAttenuationFactor; } |
---|
99 | <a name="l00140"></a><a class="code" href="class_f_c_d_light.html#dcf8a831190a37ab3212c41b4368444e">00140</a> <span class="keyword">const</span> <span class="keywordtype">float</span>& GetConstantAttenuationFactor()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> constantAttenuationFactor; } |
---|
100 | <a name="l00145"></a><a class="code" href="class_f_c_d_light.html#acb2ad42d6e14393e1016866f2fb90fa">00145</a> <span class="keywordtype">void</span> SetConstantAttenuationFactor(<span class="keywordtype">float</span> factor) { constantAttenuationFactor = factor; } |
---|
101 | <a name="l00146"></a>00146 |
---|
102 | <a name="l00150"></a><a class="code" href="class_f_c_d_light.html#4a106e742942ac5a2965fe928ad2f258">00150</a> <span class="keywordtype">float</span>& GetLinearAttenuationFactor() { <span class="keywordflow">return</span> linearAttenuationFactor; } |
---|
103 | <a name="l00151"></a><a class="code" href="class_f_c_d_light.html#0e4cfc25baf0dcd24cdd2f447317b984">00151</a> <span class="keyword">const</span> <span class="keywordtype">float</span>& GetLinearAttenuationFactor()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> linearAttenuationFactor; } |
---|
104 | <a name="l00156"></a><a class="code" href="class_f_c_d_light.html#c49add5d8113667515dbf732f54b074c">00156</a> <span class="keywordtype">void</span> SetLinearAttenuationFactor(<span class="keywordtype">float</span> factor) { linearAttenuationFactor = factor; } |
---|
105 | <a name="l00157"></a>00157 |
---|
106 | <a name="l00161"></a><a class="code" href="class_f_c_d_light.html#a27edb265c1b7cff2fe5a5025686e9c7">00161</a> <span class="keywordtype">float</span>& GetQuadraticAttenuationFactor() { <span class="keywordflow">return</span> quadracticAttenuationFactor; } |
---|
107 | <a name="l00162"></a><a class="code" href="class_f_c_d_light.html#4bf0589756633c69728170dce565327e">00162</a> <span class="keyword">const</span> <span class="keywordtype">float</span>& GetQuadraticAttenuationFactor()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> quadracticAttenuationFactor; } |
---|
108 | <a name="l00167"></a><a class="code" href="class_f_c_d_light.html#2d399fdd6cb7acb438f4a928bed8990f">00167</a> <span class="keywordtype">void</span> SetQuadraticAttenuationFactor(<span class="keywordtype">float</span> factor) { quadracticAttenuationFactor = factor; } |
---|
109 | <a name="l00168"></a>00168 |
---|
110 | <a name="l00179"></a><a class="code" href="class_f_c_d_light.html#af51d0f0502a00bcbefcd033ceb42c84">00179</a> <span class="keywordtype">float</span>& GetFallOffExponent() { <span class="keywordflow">return</span> fallOffExponent; } |
---|
111 | <a name="l00180"></a><a class="code" href="class_f_c_d_light.html#62182b28b0bea0803b1e21416236a6ae">00180</a> <span class="keyword">const</span> <span class="keywordtype">float</span>& GetFallOffExponent()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> fallOffExponent; } |
---|
112 | <a name="l00185"></a><a class="code" href="class_f_c_d_light.html#41ef012ce10d686bdd298e125523914c">00185</a> <span class="keywordtype">void</span> SetFallOffExponent(<span class="keywordtype">float</span> exponent) { fallOffExponent = exponent; } |
---|
113 | <a name="l00186"></a>00186 |
---|
114 | <a name="l00191"></a><a class="code" href="class_f_c_d_light.html#d21c5e4f518a0cf2b9b12e678eae2313">00191</a> <span class="keywordtype">float</span>& GetFallOffAngle() { <span class="keywordflow">return</span> fallOffAngle; } |
---|
115 | <a name="l00192"></a><a class="code" href="class_f_c_d_light.html#18e1d577f5bb786fef236c9f0bc8ecd7">00192</a> <span class="keyword">const</span> <span class="keywordtype">float</span>& GetFallOffAngle()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> fallOffAngle; } |
---|
116 | <a name="l00197"></a><a class="code" href="class_f_c_d_light.html#f5ab71bc8463b42473a3d65d5f5a6f53">00197</a> <span class="keywordtype">void</span> SetFallOffAngle(<span class="keywordtype">float</span> angle) { fallOffAngle = angle; } |
---|
117 | <a name="l00198"></a>00198 |
---|
118 | <a name="l00207"></a><a class="code" href="class_f_c_d_light.html#b39d55f4c016d7d81ca67271fdd78366">00207</a> <span class="keywordtype">float</span>& GetOuterAngle() { <span class="keywordflow">return</span> outerAngle; } |
---|
119 | <a name="l00208"></a><a class="code" href="class_f_c_d_light.html#976d60e1ad251179b67a823eef20066f">00208</a> <span class="keyword">const</span> <span class="keywordtype">float</span>& GetOuterAngle()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> outerAngle; } |
---|
120 | <a name="l00213"></a><a class="code" href="class_f_c_d_light.html#dd7a7a1357b00dee19f0a2add3d21818">00213</a> <span class="keywordtype">void</span> SetOuterAngle(<span class="keywordtype">float</span> angle) { outerAngle = angle; } |
---|
121 | <a name="l00214"></a>00214 |
---|
122 | <a name="l00225"></a><a class="code" href="class_f_c_d_light.html#4785b823d6f2c48119c0c9472b8b611b">00225</a> <span class="keywordtype">float</span>& GetPenumbraAngle() { <span class="keywordflow">return</span> penumbraAngle; } |
---|
123 | <a name="l00226"></a><a class="code" href="class_f_c_d_light.html#676712210b5a12bb5f57280dfa6f4a7e">00226</a> <span class="keyword">const</span> <span class="keywordtype">float</span>& GetPenumbraAngle()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> penumbraAngle; } |
---|
124 | <a name="l00231"></a><a class="code" href="class_f_c_d_light.html#4fafa71178c1b0f65ddc40455fc63cb3">00231</a> <span class="keywordtype">void</span> SetPenumbraAngle(<span class="keywordtype">float</span> angle) { penumbraAngle = angle; } |
---|
125 | <a name="l00232"></a>00232 |
---|
126 | <a name="l00242"></a><a class="code" href="class_f_c_d_light.html#8c0ec76c13844f1b1180ffbf0d2b76a9">00242</a> <span class="keywordtype">float</span>& GetAspectRatio() { <span class="keywordflow">return</span> aspectRatio; } |
---|
127 | <a name="l00243"></a><a class="code" href="class_f_c_d_light.html#426a5f9a82802d3198a947726d879560">00243</a> <span class="keyword">const</span> <span class="keywordtype">float</span>& GetAspectRatio()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> aspectRatio; } |
---|
128 | <a name="l00248"></a><a class="code" href="class_f_c_d_light.html#7ea3d101334b75f7c20bf82133035ad9">00248</a> <span class="keywordtype">void</span> SetAspectRatio(<span class="keywordtype">float</span> ratio) { aspectRatio = ratio; } |
---|
129 | <a name="l00249"></a>00249 |
---|
130 | <a name="l00253"></a><a class="code" href="class_f_c_d_light.html#3d893ac84ff23b088e7bd0243c7f6ed1">00253</a> <span class="keywordtype">float</span>& GetDropoff() { <span class="keywordflow">return</span> dropoff; } |
---|
131 | <a name="l00254"></a><a class="code" href="class_f_c_d_light.html#c770c3080bb95562a714cc1364b38062">00254</a> <span class="keyword">const</span> <span class="keywordtype">float</span>& GetDropoff()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> dropoff; } |
---|
132 | <a name="l00259"></a><a class="code" href="class_f_c_d_light.html#78e8a5e5465c92226c41cc93e22652da">00259</a> <span class="keywordtype">void</span> SetDropoff(<span class="keywordtype">float</span> factor) { dropoff = factor; } |
---|
133 | <a name="l00260"></a>00260 |
---|
134 | <a name="l00268"></a><a class="code" href="class_f_c_d_light.html#8493199542feee7ea18e283f0ebe33bc">00268</a> <span class="keywordtype">bool</span> DoesOvershoot()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> overshoots; } |
---|
135 | <a name="l00269"></a>00269 |
---|
136 | <a name="l00273"></a><a class="code" href="class_f_c_d_light.html#106026731aee85fdc770689864f9de7c">00273</a> <span class="keywordtype">void</span> SetOvershoot(<span class="keywordtype">bool</span> _overshoots) { overshoots = _overshoots; } |
---|
137 | <a name="l00274"></a>00274 |
---|
138 | <a name="l00279"></a>00279 <a class="code" href="class_f_u_status.html">FUStatus</a> <a class="code" href="class_f_c_d_entity.html#8e32fcc93de76acc4b606db7b5b83890">LoadFromXML</a>(xmlNode* lightNode); |
---|
139 | <a name="l00280"></a>00280 |
---|
140 | <a name="l00284"></a>00284 <span class="keyword">virtual</span> xmlNode* <a class="code" href="class_f_c_d_entity.html#b27f0c175c3f8fd7064cde48bcf1d7a0">WriteToXML</a>(xmlNode* parentNode) <span class="keyword">const</span>; |
---|
141 | <a name="l00285"></a>00285 }; |
---|
142 | <a name="l00286"></a>00286 |
---|
143 | <a name="l00287"></a>00287 <span class="preprocessor">#endif // _FCD_LIGHT_H_</span> |
---|
144 | <a name="l00288"></a>00288 <span class="preprocessor"></span> |
---|
145 | </pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri May 12 16:44:38 2006 for FCollada by |
---|
146 | <a href="http://www.doxygen.org/index.html"> |
---|
147 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6-NO </small></address> |
---|
148 | </body> |
---|
149 | </html> |
---|