~ubuntu-branches/ubuntu/wily/opencollada/wily-proposed

« back to all changes in this revision

Viewing changes to Externals/MayaDataModel/include/MayaDMShaderGlow.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2015-05-14 17:23:27 UTC
  • Revision ID: package-import@ubuntu.com-20150514172327-f862u8envms01fra
Tags: upstream-0.1.0~20140703.ddf8f47+dfsg1
ImportĀ upstreamĀ versionĀ 0.1.0~20140703.ddf8f47+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (c) 2008-2009 NetAllied Systems GmbH
 
3
 
 
4
    This file is part of MayaDataModel.
 
5
 
 
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
 
9
*/
 
10
#ifndef __MayaDM_SHADERGLOW_H__
 
11
#define __MayaDM_SHADERGLOW_H__
 
12
#include "MayaDMTypes.h"
 
13
#include "MayaDMConnectables.h"
 
14
#include "MayaDMDependNode.h"
 
15
namespace MayaDM
 
16
{
 
17
class ShaderGlow : public DependNode
 
18
{
 
19
public:
 
20
public:
 
21
 
 
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(){}
 
26
 
 
27
        void setGlowType(unsigned int gt)
 
28
        {
 
29
                if(gt == 1) return;
 
30
                fprintf(mFile,"\tsetAttr \".gt\" %i;\n", gt);
 
31
        }
 
32
        void setHaloType(unsigned int ht)
 
33
        {
 
34
                if(ht == 1) return;
 
35
                fprintf(mFile,"\tsetAttr \".ht\" %i;\n", ht);
 
36
        }
 
37
        void setGlowIntensity(float gi)
 
38
        {
 
39
                if(gi == 1.0) return;
 
40
                fprintf(mFile,"\tsetAttr \".gi\" %f;\n", gi);
 
41
        }
 
42
        void setGlowColor(const float3& gc)
 
43
        {
 
44
                if(gc == float3(1.0f,1.0f,1.0f)) return;
 
45
                fprintf(mFile,"\tsetAttr \".gc\" -type \"float3\" ");
 
46
                gc.write(mFile);
 
47
                fprintf(mFile,";\n");
 
48
        }
 
49
        void setGlowColorR(float gr)
 
50
        {
 
51
                if(gr == 0.0) return;
 
52
                fprintf(mFile,"\tsetAttr \".gc.gr\" %f;\n", gr);
 
53
        }
 
54
        void setGlowColorG(float gg)
 
55
        {
 
56
                if(gg == 0.0) return;
 
57
                fprintf(mFile,"\tsetAttr \".gc.gg\" %f;\n", gg);
 
58
        }
 
59
        void setGlowColorB(float gb)
 
60
        {
 
61
                if(gb == 0.0) return;
 
62
                fprintf(mFile,"\tsetAttr \".gc.gb\" %f;\n", gb);
 
63
        }
 
64
        void setGlowSpread(float gs)
 
65
        {
 
66
                if(gs == 0.05) return;
 
67
                fprintf(mFile,"\tsetAttr \".gs\" %f;\n", gs);
 
68
        }
 
69
        void setGlowEccentricity(float gecc)
 
70
        {
 
71
                if(gecc == 0.1) return;
 
72
                fprintf(mFile,"\tsetAttr \".gecc\" %f;\n", gecc);
 
73
        }
 
74
        void setGlowRadialNoise(float gn)
 
75
        {
 
76
                if(gn == 0.0) return;
 
77
                fprintf(mFile,"\tsetAttr \".gn\" %f;\n", gn);
 
78
        }
 
79
        void setGlowStarLevel(float gv)
 
80
        {
 
81
                if(gv == 0.0) return;
 
82
                fprintf(mFile,"\tsetAttr \".gv\" %f;\n", gv);
 
83
        }
 
84
        void setGlowOpacity(float go)
 
85
        {
 
86
                if(go == 0.0) return;
 
87
                fprintf(mFile,"\tsetAttr \".go\" %f;\n", go);
 
88
        }
 
89
        void setGlowRingIntensity(float gri)
 
90
        {
 
91
                if(gri == 0.0) return;
 
92
                fprintf(mFile,"\tsetAttr \".gri\" %f;\n", gri);
 
93
        }
 
94
        void setGlowRingFrequency(float grf)
 
95
        {
 
96
                if(grf == 0.5) return;
 
97
                fprintf(mFile,"\tsetAttr \".grf\" %f;\n", grf);
 
98
        }
 
99
        void setGlowFilterWidth(int gfw)
 
100
        {
 
101
                if(gfw == 1) return;
 
102
                fprintf(mFile,"\tsetAttr \".gfw\" %i;\n", gfw);
 
103
        }
 
104
        void setHaloIntensity(float hi)
 
105
        {
 
106
                if(hi == 1.0) return;
 
107
                fprintf(mFile,"\tsetAttr \".hi\" %f;\n", hi);
 
108
        }
 
109
        void setHaloColor(const float3& hc)
 
110
        {
 
111
                if(hc == float3(1.0f,1.0f,1.0f)) return;
 
112
                fprintf(mFile,"\tsetAttr \".hc\" -type \"float3\" ");
 
113
                hc.write(mFile);
 
114
                fprintf(mFile,";\n");
 
115
        }
 
116
        void setHaloColorR(float hr)
 
117
        {
 
118
                if(hr == 0.0) return;
 
119
                fprintf(mFile,"\tsetAttr \".hc.hr\" %f;\n", hr);
 
120
        }
 
121
        void setHaloColorG(float hg)
 
122
        {
 
123
                if(hg == 0.0) return;
 
124
                fprintf(mFile,"\tsetAttr \".hc.hg\" %f;\n", hg);
 
125
        }
 
126
        void setHaloColorB(float hb)
 
127
        {
 
128
                if(hb == 0.0) return;
 
129
                fprintf(mFile,"\tsetAttr \".hc.hb\" %f;\n", hb);
 
130
        }
 
131
        void setHaloSpread(float hs)
 
132
        {
 
133
                if(hs == 0.3) return;
 
134
                fprintf(mFile,"\tsetAttr \".hs\" %f;\n", hs);
 
135
        }
 
136
        void setHaloEccentricity(float hecc)
 
137
        {
 
138
                if(hecc == 0.1) return;
 
139
                fprintf(mFile,"\tsetAttr \".hecc\" %f;\n", hecc);
 
140
        }
 
141
        void setHaloRadialNoise(float hn)
 
142
        {
 
143
                if(hn == 0.0) return;
 
144
                fprintf(mFile,"\tsetAttr \".hn\" %f;\n", hn);
 
145
        }
 
146
        void setHaloStarLevel(float hv)
 
147
        {
 
148
                if(hv == 0.0) return;
 
149
                fprintf(mFile,"\tsetAttr \".hv\" %f;\n", hv);
 
150
        }
 
151
        void setHaloOpacity(float ho)
 
152
        {
 
153
                if(ho == 0.0) return;
 
154
                fprintf(mFile,"\tsetAttr \".ho\" %f;\n", ho);
 
155
        }
 
156
        void setHaloRingIntensity(float hri)
 
157
        {
 
158
                if(hri == 0.0) return;
 
159
                fprintf(mFile,"\tsetAttr \".hri\" %f;\n", hri);
 
160
        }
 
161
        void setHaloRingFrequency(float hrf)
 
162
        {
 
163
                if(hrf == 0.5) return;
 
164
                fprintf(mFile,"\tsetAttr \".hrf\" %f;\n", hrf);
 
165
        }
 
166
        void setHaloFilterWidth(int hfw)
 
167
        {
 
168
                if(hfw == 1) return;
 
169
                fprintf(mFile,"\tsetAttr \".hfw\" %i;\n", hfw);
 
170
        }
 
171
        void setQuality(float qual)
 
172
        {
 
173
                if(qual == 0.5) return;
 
174
                fprintf(mFile,"\tsetAttr \".qual\" %f;\n", qual);
 
175
        }
 
176
        void setThreshold(float th)
 
177
        {
 
178
                if(th == 0.0) return;
 
179
                fprintf(mFile,"\tsetAttr \".th\" %f;\n", th);
 
180
        }
 
181
        void setRadialFrequency(float rf)
 
182
        {
 
183
                if(rf == 0.5) return;
 
184
                fprintf(mFile,"\tsetAttr \".rf\" %f;\n", rf);
 
185
        }
 
186
        void setStarPoints(float sp)
 
187
        {
 
188
                if(sp == 4.0) return;
 
189
                fprintf(mFile,"\tsetAttr \".sp\" %f;\n", sp);
 
190
        }
 
191
        void setRotation(float ra)
 
192
        {
 
193
                if(ra == 0.0) return;
 
194
                fprintf(mFile,"\tsetAttr \".ra\" %f;\n", ra);
 
195
        }
 
196
        void setAutoExposure(bool ae)
 
197
        {
 
198
                if(ae == true) return;
 
199
                fprintf(mFile,"\tsetAttr \".ae\" %i;\n", ae);
 
200
        }
 
201
        void getGlowType()const
 
202
        {
 
203
                fprintf(mFile,"\"%s.gt\"",mName.c_str());
 
204
        }
 
205
        void getHaloType()const
 
206
        {
 
207
                fprintf(mFile,"\"%s.ht\"",mName.c_str());
 
208
        }
 
209
        void getGlowIntensity()const
 
210
        {
 
211
                fprintf(mFile,"\"%s.gi\"",mName.c_str());
 
212
        }
 
213
        void getGlowColor()const
 
214
        {
 
215
                fprintf(mFile,"\"%s.gc\"",mName.c_str());
 
216
        }
 
217
        void getGlowColorR()const
 
218
        {
 
219
                fprintf(mFile,"\"%s.gc.gr\"",mName.c_str());
 
220
        }
 
221
        void getGlowColorG()const
 
222
        {
 
223
                fprintf(mFile,"\"%s.gc.gg\"",mName.c_str());
 
224
        }
 
225
        void getGlowColorB()const
 
226
        {
 
227
                fprintf(mFile,"\"%s.gc.gb\"",mName.c_str());
 
228
        }
 
229
        void getGlowSpread()const
 
230
        {
 
231
                fprintf(mFile,"\"%s.gs\"",mName.c_str());
 
232
        }
 
233
        void getGlowEccentricity()const
 
234
        {
 
235
                fprintf(mFile,"\"%s.gecc\"",mName.c_str());
 
236
        }
 
237
        void getGlowRadialNoise()const
 
238
        {
 
239
                fprintf(mFile,"\"%s.gn\"",mName.c_str());
 
240
        }
 
241
        void getGlowStarLevel()const
 
242
        {
 
243
                fprintf(mFile,"\"%s.gv\"",mName.c_str());
 
244
        }
 
245
        void getGlowOpacity()const
 
246
        {
 
247
                fprintf(mFile,"\"%s.go\"",mName.c_str());
 
248
        }
 
249
        void getGlowRingIntensity()const
 
250
        {
 
251
                fprintf(mFile,"\"%s.gri\"",mName.c_str());
 
252
        }
 
253
        void getGlowRingFrequency()const
 
254
        {
 
255
                fprintf(mFile,"\"%s.grf\"",mName.c_str());
 
256
        }
 
257
        void getGlowFilterWidth()const
 
258
        {
 
259
                fprintf(mFile,"\"%s.gfw\"",mName.c_str());
 
260
        }
 
261
        void getHaloIntensity()const
 
262
        {
 
263
                fprintf(mFile,"\"%s.hi\"",mName.c_str());
 
264
        }
 
265
        void getHaloColor()const
 
266
        {
 
267
                fprintf(mFile,"\"%s.hc\"",mName.c_str());
 
268
        }
 
269
        void getHaloColorR()const
 
270
        {
 
271
                fprintf(mFile,"\"%s.hc.hr\"",mName.c_str());
 
272
        }
 
273
        void getHaloColorG()const
 
274
        {
 
275
                fprintf(mFile,"\"%s.hc.hg\"",mName.c_str());
 
276
        }
 
277
        void getHaloColorB()const
 
278
        {
 
279
                fprintf(mFile,"\"%s.hc.hb\"",mName.c_str());
 
280
        }
 
281
        void getHaloSpread()const
 
282
        {
 
283
                fprintf(mFile,"\"%s.hs\"",mName.c_str());
 
284
        }
 
285
        void getHaloEccentricity()const
 
286
        {
 
287
                fprintf(mFile,"\"%s.hecc\"",mName.c_str());
 
288
        }
 
289
        void getHaloRadialNoise()const
 
290
        {
 
291
                fprintf(mFile,"\"%s.hn\"",mName.c_str());
 
292
        }
 
293
        void getHaloStarLevel()const
 
294
        {
 
295
                fprintf(mFile,"\"%s.hv\"",mName.c_str());
 
296
        }
 
297
        void getHaloOpacity()const
 
298
        {
 
299
                fprintf(mFile,"\"%s.ho\"",mName.c_str());
 
300
        }
 
301
        void getHaloRingIntensity()const
 
302
        {
 
303
                fprintf(mFile,"\"%s.hri\"",mName.c_str());
 
304
        }
 
305
        void getHaloRingFrequency()const
 
306
        {
 
307
                fprintf(mFile,"\"%s.hrf\"",mName.c_str());
 
308
        }
 
309
        void getHaloFilterWidth()const
 
310
        {
 
311
                fprintf(mFile,"\"%s.hfw\"",mName.c_str());
 
312
        }
 
313
        void getQuality()const
 
314
        {
 
315
                fprintf(mFile,"\"%s.qual\"",mName.c_str());
 
316
        }
 
317
        void getThreshold()const
 
318
        {
 
319
                fprintf(mFile,"\"%s.th\"",mName.c_str());
 
320
        }
 
321
        void getRadialFrequency()const
 
322
        {
 
323
                fprintf(mFile,"\"%s.rf\"",mName.c_str());
 
324
        }
 
325
        void getStarPoints()const
 
326
        {
 
327
                fprintf(mFile,"\"%s.sp\"",mName.c_str());
 
328
        }
 
329
        void getRotation()const
 
330
        {
 
331
                fprintf(mFile,"\"%s.ra\"",mName.c_str());
 
332
        }
 
333
        void getAutoExposure()const
 
334
        {
 
335
                fprintf(mFile,"\"%s.ae\"",mName.c_str());
 
336
        }
 
337
protected:
 
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) {}
 
340
 
 
341
};
 
342
}//namespace MayaDM
 
343
#endif//__MayaDM_SHADERGLOW_H__