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_REVOLVE_H__
11
#define __MayaDM_REVOLVE_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMAbstractBaseCreate.h"
17
class Revolve : public AbstractBaseCreate
22
Revolve():AbstractBaseCreate(){}
23
Revolve(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:AbstractBaseCreate(file, name, parent, "revolve", shared, create){}
27
void setStartSweep(double ssw)
30
fprintf(mFile,"\tsetAttr \".ssw\" %f;\n", ssw);
32
void setEndSweep(double esw)
34
if(esw == 6.2831853) return;
35
fprintf(mFile,"\tsetAttr \".esw\" %f;\n", esw);
37
void setUseTolerance(bool ut)
39
if(ut == false) return;
40
fprintf(mFile,"\tsetAttr \".ut\" %i;\n", ut);
42
void setDegree(unsigned int d)
45
fprintf(mFile,"\tsetAttr \".d\" %i;\n", d);
47
void setSections(int s)
50
fprintf(mFile,"\tsetAttr \".s\" %i;\n", s);
52
void setTolerance(double tol)
55
fprintf(mFile,"\tsetAttr \".tol\" %f;\n", tol);
57
void setAxis(const double3& ax)
59
fprintf(mFile,"\tsetAttr \".ax\" -type \"double3\" ");
63
void setAxisX(double axx)
66
fprintf(mFile,"\tsetAttr \".ax.axx\" %f;\n", axx);
68
void setAxisY(double axy)
71
fprintf(mFile,"\tsetAttr \".ax.axy\" %f;\n", axy);
73
void setAxisZ(double axz)
76
fprintf(mFile,"\tsetAttr \".ax.axz\" %f;\n", axz);
78
void setPivot(const double3& p)
80
fprintf(mFile,"\tsetAttr \".p\" -type \"double3\" ");
84
void setPivotX(double px)
87
fprintf(mFile,"\tsetAttr \".p.px\" %f;\n", px);
89
void setPivotY(double py)
92
fprintf(mFile,"\tsetAttr \".p.py\" %f;\n", py);
94
void setPivotZ(double pz)
97
fprintf(mFile,"\tsetAttr \".p.pz\" %f;\n", pz);
99
void setAutoCorrectNormal(bool acn)
101
if(acn == false) return;
102
fprintf(mFile,"\tsetAttr \".acn\" %i;\n", acn);
104
void setComputePivotAndAxis(unsigned int cpa)
107
fprintf(mFile,"\tsetAttr \".cpa\" %i;\n", cpa);
109
void setRadius(double r)
112
fprintf(mFile,"\tsetAttr \".r\" %f;\n", r);
114
void setRadiusAnchor(double ra)
117
fprintf(mFile,"\tsetAttr \".ra\" %f;\n", ra);
119
void setAxisChoice(unsigned int aco)
122
fprintf(mFile,"\tsetAttr \".aco\" %i;\n", aco);
124
void setBridge(bool br)
126
if(br == false) return;
127
fprintf(mFile,"\tsetAttr \".br\" %i;\n", br);
129
void getInputCurve()const
131
fprintf(mFile,"\"%s.ic\"",mName.c_str());
133
void getStartSweep()const
135
fprintf(mFile,"\"%s.ssw\"",mName.c_str());
137
void getEndSweep()const
139
fprintf(mFile,"\"%s.esw\"",mName.c_str());
141
void getUseTolerance()const
143
fprintf(mFile,"\"%s.ut\"",mName.c_str());
145
void getDegree()const
147
fprintf(mFile,"\"%s.d\"",mName.c_str());
149
void getSections()const
151
fprintf(mFile,"\"%s.s\"",mName.c_str());
153
void getTolerance()const
155
fprintf(mFile,"\"%s.tol\"",mName.c_str());
159
fprintf(mFile,"\"%s.ax\"",mName.c_str());
163
fprintf(mFile,"\"%s.ax.axx\"",mName.c_str());
167
fprintf(mFile,"\"%s.ax.axy\"",mName.c_str());
171
fprintf(mFile,"\"%s.ax.axz\"",mName.c_str());
175
fprintf(mFile,"\"%s.p\"",mName.c_str());
177
void getPivotX()const
179
fprintf(mFile,"\"%s.p.px\"",mName.c_str());
181
void getPivotY()const
183
fprintf(mFile,"\"%s.p.py\"",mName.c_str());
185
void getPivotZ()const
187
fprintf(mFile,"\"%s.p.pz\"",mName.c_str());
189
void getAutoCorrectNormal()const
191
fprintf(mFile,"\"%s.acn\"",mName.c_str());
193
void getComputePivotAndAxis()const
195
fprintf(mFile,"\"%s.cpa\"",mName.c_str());
197
void getRadius()const
199
fprintf(mFile,"\"%s.r\"",mName.c_str());
201
void getRadiusAnchor()const
203
fprintf(mFile,"\"%s.ra\"",mName.c_str());
205
void getAxisChoice()const
207
fprintf(mFile,"\"%s.aco\"",mName.c_str());
209
void getBridge()const
211
fprintf(mFile,"\"%s.br\"",mName.c_str());
213
void getOutputSurface()const
215
fprintf(mFile,"\"%s.os\"",mName.c_str());
217
void getBridgeCurve()const
219
fprintf(mFile,"\"%s.bc\"",mName.c_str());
221
void getCompAxis()const
223
fprintf(mFile,"\"%s.ca\"",mName.c_str());
225
void getCompAxisX()const
227
fprintf(mFile,"\"%s.ca.cax\"",mName.c_str());
229
void getCompAxisY()const
231
fprintf(mFile,"\"%s.ca.cay\"",mName.c_str());
233
void getCompAxisZ()const
235
fprintf(mFile,"\"%s.ca.caz\"",mName.c_str());
237
void getCompPivot()const
239
fprintf(mFile,"\"%s.cp\"",mName.c_str());
241
void getCompPivotX()const
243
fprintf(mFile,"\"%s.cp.cpx\"",mName.c_str());
245
void getCompPivotY()const
247
fprintf(mFile,"\"%s.cp.cpy\"",mName.c_str());
249
void getCompPivotZ()const
251
fprintf(mFile,"\"%s.cp.cpz\"",mName.c_str());
253
void getCompAxisChoice()const
255
fprintf(mFile,"\"%s.cac\"",mName.c_str());
257
void getCompAnchor()const
259
fprintf(mFile,"\"%s.cn\"",mName.c_str());
261
void getCompAnchorX()const
263
fprintf(mFile,"\"%s.cn.cnx\"",mName.c_str());
265
void getCompAnchorY()const
267
fprintf(mFile,"\"%s.cn.cny\"",mName.c_str());
269
void getCompAnchorZ()const
271
fprintf(mFile,"\"%s.cn.cnz\"",mName.c_str());
274
Revolve(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
275
:AbstractBaseCreate(file, name, parent, nodeType, shared, create) {}
279
#endif//__MayaDM_REVOLVE_H__