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_MAKENURBCIRCLE_H__
11
#define __MayaDM_MAKENURBCIRCLE_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMAbstractBaseCreate.h"
17
class MakeNurbCircle : public AbstractBaseCreate
22
MakeNurbCircle():AbstractBaseCreate(){}
23
MakeNurbCircle(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:AbstractBaseCreate(file, name, parent, "makeNurbCircle", shared, create){}
25
virtual ~MakeNurbCircle(){}
27
void setFirst(const double3& fp)
29
fprintf(mFile,"\tsetAttr \".fp\" -type \"double3\" ");
33
void setFirstPointX(double fpx)
36
fprintf(mFile,"\tsetAttr \".fp.fpx\" %f;\n", fpx);
38
void setFirstPointY(double fpy)
41
fprintf(mFile,"\tsetAttr \".fp.fpy\" %f;\n", fpy);
43
void setFirstPointZ(double fpz)
46
fprintf(mFile,"\tsetAttr \".fp.fpz\" %f;\n", fpz);
48
void setNormal(const double3& nr)
50
fprintf(mFile,"\tsetAttr \".nr\" -type \"double3\" ");
54
void setNormalX(double nrx)
57
fprintf(mFile,"\tsetAttr \".nr.nrx\" %f;\n", nrx);
59
void setNormalY(double nry)
62
fprintf(mFile,"\tsetAttr \".nr.nry\" %f;\n", nry);
64
void setNormalZ(double nrz)
67
fprintf(mFile,"\tsetAttr \".nr.nrz\" %f;\n", nrz);
69
void setCenter(const double3& c)
71
fprintf(mFile,"\tsetAttr \".c\" -type \"double3\" ");
75
void setCenterX(double cx)
78
fprintf(mFile,"\tsetAttr \".c.cx\" %f;\n", cx);
80
void setCenterY(double cy)
83
fprintf(mFile,"\tsetAttr \".c.cy\" %f;\n", cy);
85
void setCenterZ(double cz)
88
fprintf(mFile,"\tsetAttr \".c.cz\" %f;\n", cz);
90
void setRadius(double r)
93
fprintf(mFile,"\tsetAttr \".r\" %f;\n", r);
95
void setSweep(double sw)
97
if(sw == 6.2831853) return;
98
fprintf(mFile,"\tsetAttr \".sw\" %f;\n", sw);
100
void setUseTolerance(bool ut)
102
if(ut == false) return;
103
fprintf(mFile,"\tsetAttr \".ut\" %i;\n", ut);
105
void setDegree(unsigned int d)
108
fprintf(mFile,"\tsetAttr \".d\" %i;\n", d);
110
void setSections(int s)
113
fprintf(mFile,"\tsetAttr \".s\" %i;\n", s);
115
void setTolerance(double tol)
118
fprintf(mFile,"\tsetAttr \".tol\" %f;\n", tol);
120
void setFixCenter(bool fc)
122
if(fc == true) return;
123
fprintf(mFile,"\tsetAttr \".fc\" %i;\n", fc);
127
fprintf(mFile,"\"%s.fp\"",mName.c_str());
129
void getFirstPointX()const
131
fprintf(mFile,"\"%s.fp.fpx\"",mName.c_str());
133
void getFirstPointY()const
135
fprintf(mFile,"\"%s.fp.fpy\"",mName.c_str());
137
void getFirstPointZ()const
139
fprintf(mFile,"\"%s.fp.fpz\"",mName.c_str());
141
void getNormal()const
143
fprintf(mFile,"\"%s.nr\"",mName.c_str());
145
void getNormalX()const
147
fprintf(mFile,"\"%s.nr.nrx\"",mName.c_str());
149
void getNormalY()const
151
fprintf(mFile,"\"%s.nr.nry\"",mName.c_str());
153
void getNormalZ()const
155
fprintf(mFile,"\"%s.nr.nrz\"",mName.c_str());
157
void getCenter()const
159
fprintf(mFile,"\"%s.c\"",mName.c_str());
161
void getCenterX()const
163
fprintf(mFile,"\"%s.c.cx\"",mName.c_str());
165
void getCenterY()const
167
fprintf(mFile,"\"%s.c.cy\"",mName.c_str());
169
void getCenterZ()const
171
fprintf(mFile,"\"%s.c.cz\"",mName.c_str());
173
void getRadius()const
175
fprintf(mFile,"\"%s.r\"",mName.c_str());
179
fprintf(mFile,"\"%s.sw\"",mName.c_str());
181
void getUseTolerance()const
183
fprintf(mFile,"\"%s.ut\"",mName.c_str());
185
void getDegree()const
187
fprintf(mFile,"\"%s.d\"",mName.c_str());
189
void getSections()const
191
fprintf(mFile,"\"%s.s\"",mName.c_str());
193
void getTolerance()const
195
fprintf(mFile,"\"%s.tol\"",mName.c_str());
197
void getFixCenter()const
199
fprintf(mFile,"\"%s.fc\"",mName.c_str());
201
void getOutputCurve()const
203
fprintf(mFile,"\"%s.oc\"",mName.c_str());
206
MakeNurbCircle(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
207
:AbstractBaseCreate(file, name, parent, nodeType, shared, create) {}
211
#endif//__MayaDM_MAKENURBCIRCLE_H__