2
Copyright (c) 2008-2009 NetAllied Systems GmbH
4
This file is part of MayaDataModel.
6
Licensed under the MIT Open Source License,
7
for details please see LICENSE file or the website
8
http://www.opensource.org/licenses/mit-license.php
10
#ifndef __MayaDM_SHADERGLOW_H__
11
#define __MayaDM_SHADERGLOW_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMDependNode.h"
17
class ShaderGlow : public DependNode
22
ShaderGlow():DependNode(){}
23
ShaderGlow(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:DependNode(file, name, parent, "shaderGlow", shared, create){}
25
virtual ~ShaderGlow(){}
27
void setGlowType(unsigned int gt)
30
fprintf(mFile,"\tsetAttr \".gt\" %i;\n", gt);
32
void setHaloType(unsigned int ht)
35
fprintf(mFile,"\tsetAttr \".ht\" %i;\n", ht);
37
void setGlowIntensity(float gi)
40
fprintf(mFile,"\tsetAttr \".gi\" %f;\n", gi);
42
void setGlowColor(const float3& gc)
44
if(gc == float3(1.0f,1.0f,1.0f)) return;
45
fprintf(mFile,"\tsetAttr \".gc\" -type \"float3\" ");
49
void setGlowColorR(float gr)
52
fprintf(mFile,"\tsetAttr \".gc.gr\" %f;\n", gr);
54
void setGlowColorG(float gg)
57
fprintf(mFile,"\tsetAttr \".gc.gg\" %f;\n", gg);
59
void setGlowColorB(float gb)
62
fprintf(mFile,"\tsetAttr \".gc.gb\" %f;\n", gb);
64
void setGlowSpread(float gs)
66
if(gs == 0.05) return;
67
fprintf(mFile,"\tsetAttr \".gs\" %f;\n", gs);
69
void setGlowEccentricity(float gecc)
71
if(gecc == 0.1) return;
72
fprintf(mFile,"\tsetAttr \".gecc\" %f;\n", gecc);
74
void setGlowRadialNoise(float gn)
77
fprintf(mFile,"\tsetAttr \".gn\" %f;\n", gn);
79
void setGlowStarLevel(float gv)
82
fprintf(mFile,"\tsetAttr \".gv\" %f;\n", gv);
84
void setGlowOpacity(float go)
87
fprintf(mFile,"\tsetAttr \".go\" %f;\n", go);
89
void setGlowRingIntensity(float gri)
91
if(gri == 0.0) return;
92
fprintf(mFile,"\tsetAttr \".gri\" %f;\n", gri);
94
void setGlowRingFrequency(float grf)
96
if(grf == 0.5) return;
97
fprintf(mFile,"\tsetAttr \".grf\" %f;\n", grf);
99
void setGlowFilterWidth(int gfw)
102
fprintf(mFile,"\tsetAttr \".gfw\" %i;\n", gfw);
104
void setHaloIntensity(float hi)
106
if(hi == 1.0) return;
107
fprintf(mFile,"\tsetAttr \".hi\" %f;\n", hi);
109
void setHaloColor(const float3& hc)
111
if(hc == float3(1.0f,1.0f,1.0f)) return;
112
fprintf(mFile,"\tsetAttr \".hc\" -type \"float3\" ");
114
fprintf(mFile,";\n");
116
void setHaloColorR(float hr)
118
if(hr == 0.0) return;
119
fprintf(mFile,"\tsetAttr \".hc.hr\" %f;\n", hr);
121
void setHaloColorG(float hg)
123
if(hg == 0.0) return;
124
fprintf(mFile,"\tsetAttr \".hc.hg\" %f;\n", hg);
126
void setHaloColorB(float hb)
128
if(hb == 0.0) return;
129
fprintf(mFile,"\tsetAttr \".hc.hb\" %f;\n", hb);
131
void setHaloSpread(float hs)
133
if(hs == 0.3) return;
134
fprintf(mFile,"\tsetAttr \".hs\" %f;\n", hs);
136
void setHaloEccentricity(float hecc)
138
if(hecc == 0.1) return;
139
fprintf(mFile,"\tsetAttr \".hecc\" %f;\n", hecc);
141
void setHaloRadialNoise(float hn)
143
if(hn == 0.0) return;
144
fprintf(mFile,"\tsetAttr \".hn\" %f;\n", hn);
146
void setHaloStarLevel(float hv)
148
if(hv == 0.0) return;
149
fprintf(mFile,"\tsetAttr \".hv\" %f;\n", hv);
151
void setHaloOpacity(float ho)
153
if(ho == 0.0) return;
154
fprintf(mFile,"\tsetAttr \".ho\" %f;\n", ho);
156
void setHaloRingIntensity(float hri)
158
if(hri == 0.0) return;
159
fprintf(mFile,"\tsetAttr \".hri\" %f;\n", hri);
161
void setHaloRingFrequency(float hrf)
163
if(hrf == 0.5) return;
164
fprintf(mFile,"\tsetAttr \".hrf\" %f;\n", hrf);
166
void setHaloFilterWidth(int hfw)
169
fprintf(mFile,"\tsetAttr \".hfw\" %i;\n", hfw);
171
void setQuality(float qual)
173
if(qual == 0.5) return;
174
fprintf(mFile,"\tsetAttr \".qual\" %f;\n", qual);
176
void setThreshold(float th)
178
if(th == 0.0) return;
179
fprintf(mFile,"\tsetAttr \".th\" %f;\n", th);
181
void setRadialFrequency(float rf)
183
if(rf == 0.5) return;
184
fprintf(mFile,"\tsetAttr \".rf\" %f;\n", rf);
186
void setStarPoints(float sp)
188
if(sp == 4.0) return;
189
fprintf(mFile,"\tsetAttr \".sp\" %f;\n", sp);
191
void setRotation(float ra)
193
if(ra == 0.0) return;
194
fprintf(mFile,"\tsetAttr \".ra\" %f;\n", ra);
196
void setAutoExposure(bool ae)
198
if(ae == true) return;
199
fprintf(mFile,"\tsetAttr \".ae\" %i;\n", ae);
201
void getGlowType()const
203
fprintf(mFile,"\"%s.gt\"",mName.c_str());
205
void getHaloType()const
207
fprintf(mFile,"\"%s.ht\"",mName.c_str());
209
void getGlowIntensity()const
211
fprintf(mFile,"\"%s.gi\"",mName.c_str());
213
void getGlowColor()const
215
fprintf(mFile,"\"%s.gc\"",mName.c_str());
217
void getGlowColorR()const
219
fprintf(mFile,"\"%s.gc.gr\"",mName.c_str());
221
void getGlowColorG()const
223
fprintf(mFile,"\"%s.gc.gg\"",mName.c_str());
225
void getGlowColorB()const
227
fprintf(mFile,"\"%s.gc.gb\"",mName.c_str());
229
void getGlowSpread()const
231
fprintf(mFile,"\"%s.gs\"",mName.c_str());
233
void getGlowEccentricity()const
235
fprintf(mFile,"\"%s.gecc\"",mName.c_str());
237
void getGlowRadialNoise()const
239
fprintf(mFile,"\"%s.gn\"",mName.c_str());
241
void getGlowStarLevel()const
243
fprintf(mFile,"\"%s.gv\"",mName.c_str());
245
void getGlowOpacity()const
247
fprintf(mFile,"\"%s.go\"",mName.c_str());
249
void getGlowRingIntensity()const
251
fprintf(mFile,"\"%s.gri\"",mName.c_str());
253
void getGlowRingFrequency()const
255
fprintf(mFile,"\"%s.grf\"",mName.c_str());
257
void getGlowFilterWidth()const
259
fprintf(mFile,"\"%s.gfw\"",mName.c_str());
261
void getHaloIntensity()const
263
fprintf(mFile,"\"%s.hi\"",mName.c_str());
265
void getHaloColor()const
267
fprintf(mFile,"\"%s.hc\"",mName.c_str());
269
void getHaloColorR()const
271
fprintf(mFile,"\"%s.hc.hr\"",mName.c_str());
273
void getHaloColorG()const
275
fprintf(mFile,"\"%s.hc.hg\"",mName.c_str());
277
void getHaloColorB()const
279
fprintf(mFile,"\"%s.hc.hb\"",mName.c_str());
281
void getHaloSpread()const
283
fprintf(mFile,"\"%s.hs\"",mName.c_str());
285
void getHaloEccentricity()const
287
fprintf(mFile,"\"%s.hecc\"",mName.c_str());
289
void getHaloRadialNoise()const
291
fprintf(mFile,"\"%s.hn\"",mName.c_str());
293
void getHaloStarLevel()const
295
fprintf(mFile,"\"%s.hv\"",mName.c_str());
297
void getHaloOpacity()const
299
fprintf(mFile,"\"%s.ho\"",mName.c_str());
301
void getHaloRingIntensity()const
303
fprintf(mFile,"\"%s.hri\"",mName.c_str());
305
void getHaloRingFrequency()const
307
fprintf(mFile,"\"%s.hrf\"",mName.c_str());
309
void getHaloFilterWidth()const
311
fprintf(mFile,"\"%s.hfw\"",mName.c_str());
313
void getQuality()const
315
fprintf(mFile,"\"%s.qual\"",mName.c_str());
317
void getThreshold()const
319
fprintf(mFile,"\"%s.th\"",mName.c_str());
321
void getRadialFrequency()const
323
fprintf(mFile,"\"%s.rf\"",mName.c_str());
325
void getStarPoints()const
327
fprintf(mFile,"\"%s.sp\"",mName.c_str());
329
void getRotation()const
331
fprintf(mFile,"\"%s.ra\"",mName.c_str());
333
void getAutoExposure()const
335
fprintf(mFile,"\"%s.ae\"",mName.c_str());
338
ShaderGlow(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
339
:DependNode(file, name, parent, nodeType, shared, create) {}
343
#endif//__MayaDM_SHADERGLOW_H__