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_CLOUD_H__
11
#define __MayaDM_CLOUD_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMTexture3d.h"
17
class Cloud : public Texture3d
23
Cloud(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:Texture3d(file, name, parent, "cloud", shared, create){}
27
void setXPixelAngle(float xpa)
29
if(xpa == 0.002053) return;
30
fprintf(mFile,"\tsetAttr \".xpa\" %f;\n", xpa);
32
void setColor1(const float3& c1)
34
if(c1 == float3(0.0f,0.0f,0.0f)) return;
35
fprintf(mFile,"\tsetAttr \".c1\" -type \"float3\" ");
39
void setColor1R(float c1r)
41
if(c1r == 0.0) return;
42
fprintf(mFile,"\tsetAttr \".c1.c1r\" %f;\n", c1r);
44
void setColor1G(float c1g)
46
if(c1g == 0.0) return;
47
fprintf(mFile,"\tsetAttr \".c1.c1g\" %f;\n", c1g);
49
void setColor1B(float c1b)
51
if(c1b == 0.0) return;
52
fprintf(mFile,"\tsetAttr \".c1.c1b\" %f;\n", c1b);
54
void setColor2(const float3& c2)
56
if(c2 == float3(1.0f,1.0f,1.0f)) return;
57
fprintf(mFile,"\tsetAttr \".c2\" -type \"float3\" ");
61
void setColor2R(float c2r)
63
if(c2r == 0.0) return;
64
fprintf(mFile,"\tsetAttr \".c2.c2r\" %f;\n", c2r);
66
void setColor2G(float c2g)
68
if(c2g == 0.0) return;
69
fprintf(mFile,"\tsetAttr \".c2.c2g\" %f;\n", c2g);
71
void setColor2B(float c2b)
73
if(c2b == 0.0) return;
74
fprintf(mFile,"\tsetAttr \".c2.c2b\" %f;\n", c2b);
76
void setContrast(float c)
79
fprintf(mFile,"\tsetAttr \".c\" %f;\n", c);
81
void setSoftEdges(bool se)
83
if(se == true) return;
84
fprintf(mFile,"\tsetAttr \".se\" %i;\n", se);
86
void setTranspRange(float tr)
89
fprintf(mFile,"\tsetAttr \".tr\" %f;\n", tr);
91
void setCenterThresh(float ct)
94
fprintf(mFile,"\tsetAttr \".ct\" %f;\n", ct);
96
void setEdgeThresh(float et)
99
fprintf(mFile,"\tsetAttr \".et\" %f;\n", et);
101
void setRipples(const float3& r)
103
if(r == float3(1.0f,1.0f,1.0f)) return;
104
fprintf(mFile,"\tsetAttr \".r\" -type \"float3\" ");
106
fprintf(mFile,";\n");
108
void setRipplesX(float rx)
110
if(rx == 0.0) return;
111
fprintf(mFile,"\tsetAttr \".r.rx\" %f;\n", rx);
113
void setRipplesY(float ry)
115
if(ry == 0.0) return;
116
fprintf(mFile,"\tsetAttr \".r.ry\" %f;\n", ry);
118
void setRipplesZ(float rz)
120
if(rz == 0.0) return;
121
fprintf(mFile,"\tsetAttr \".r.rz\" %f;\n", rz);
123
void setDepth(const float2& d)
125
if(d == float2(0.0f,8.0f)) return;
126
fprintf(mFile,"\tsetAttr \".d\" -type \"float2\" ");
128
fprintf(mFile,";\n");
130
void setDepthMin(float dmn)
132
if(dmn == 0.0) return;
133
fprintf(mFile,"\tsetAttr \".d.dmn\" %f;\n", dmn);
135
void setDepthMax(float dmx)
137
if(dmx == 0.0) return;
138
fprintf(mFile,"\tsetAttr \".d.dmx\" %f;\n", dmx);
140
void setAmplitude(float a)
143
fprintf(mFile,"\tsetAttr \".a\" %f;\n", a);
145
void setRatio(float ra)
147
if(ra == 0.707) return;
148
fprintf(mFile,"\tsetAttr \".ra\" %f;\n", ra);
150
void getNormalCamera()const
152
fprintf(mFile,"\"%s.n\"",mName.c_str());
154
void getNormalCameraX()const
156
fprintf(mFile,"\"%s.n.nx\"",mName.c_str());
158
void getNormalCameraY()const
160
fprintf(mFile,"\"%s.n.ny\"",mName.c_str());
162
void getNormalCameraZ()const
164
fprintf(mFile,"\"%s.n.nz\"",mName.c_str());
166
void getRefPointObj()const
168
fprintf(mFile,"\"%s.rpo\"",mName.c_str());
170
void getRefPointObjX()const
172
fprintf(mFile,"\"%s.rpo.rox\"",mName.c_str());
174
void getRefPointObjY()const
176
fprintf(mFile,"\"%s.rpo.roy\"",mName.c_str());
178
void getRefPointObjZ()const
180
fprintf(mFile,"\"%s.rpo.roz\"",mName.c_str());
182
void getRefPointCamera()const
184
fprintf(mFile,"\"%s.rpc\"",mName.c_str());
186
void getRefPointCameraX()const
188
fprintf(mFile,"\"%s.rpc.rcx\"",mName.c_str());
190
void getRefPointCameraY()const
192
fprintf(mFile,"\"%s.rpc.rcy\"",mName.c_str());
194
void getRefPointCameraZ()const
196
fprintf(mFile,"\"%s.rpc.rcz\"",mName.c_str());
198
void getXPixelAngle()const
200
fprintf(mFile,"\"%s.xpa\"",mName.c_str());
202
void getEyeToTextureMatrix()const
204
fprintf(mFile,"\"%s.e2t\"",mName.c_str());
206
void getColor1()const
208
fprintf(mFile,"\"%s.c1\"",mName.c_str());
210
void getColor1R()const
212
fprintf(mFile,"\"%s.c1.c1r\"",mName.c_str());
214
void getColor1G()const
216
fprintf(mFile,"\"%s.c1.c1g\"",mName.c_str());
218
void getColor1B()const
220
fprintf(mFile,"\"%s.c1.c1b\"",mName.c_str());
222
void getColor2()const
224
fprintf(mFile,"\"%s.c2\"",mName.c_str());
226
void getColor2R()const
228
fprintf(mFile,"\"%s.c2.c2r\"",mName.c_str());
230
void getColor2G()const
232
fprintf(mFile,"\"%s.c2.c2g\"",mName.c_str());
234
void getColor2B()const
236
fprintf(mFile,"\"%s.c2.c2b\"",mName.c_str());
238
void getContrast()const
240
fprintf(mFile,"\"%s.c\"",mName.c_str());
242
void getSoftEdges()const
244
fprintf(mFile,"\"%s.se\"",mName.c_str());
246
void getTranspRange()const
248
fprintf(mFile,"\"%s.tr\"",mName.c_str());
250
void getCenterThresh()const
252
fprintf(mFile,"\"%s.ct\"",mName.c_str());
254
void getEdgeThresh()const
256
fprintf(mFile,"\"%s.et\"",mName.c_str());
258
void getRipples()const
260
fprintf(mFile,"\"%s.r\"",mName.c_str());
262
void getRipplesX()const
264
fprintf(mFile,"\"%s.r.rx\"",mName.c_str());
266
void getRipplesY()const
268
fprintf(mFile,"\"%s.r.ry\"",mName.c_str());
270
void getRipplesZ()const
272
fprintf(mFile,"\"%s.r.rz\"",mName.c_str());
276
fprintf(mFile,"\"%s.d\"",mName.c_str());
278
void getDepthMin()const
280
fprintf(mFile,"\"%s.d.dmn\"",mName.c_str());
282
void getDepthMax()const
284
fprintf(mFile,"\"%s.d.dmx\"",mName.c_str());
286
void getAmplitude()const
288
fprintf(mFile,"\"%s.a\"",mName.c_str());
292
fprintf(mFile,"\"%s.ra\"",mName.c_str());
295
Cloud(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
296
:Texture3d(file, name, parent, nodeType, shared, create) {}
300
#endif//__MayaDM_CLOUD_H__