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_PARENTTESSELLATE_H__
11
#define __MayaDM_PARENTTESSELLATE_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMAbstractBaseNurbsConversion.h"
17
class ParentTessellate : public AbstractBaseNurbsConversion
22
ParentTessellate():AbstractBaseNurbsConversion(){}
23
ParentTessellate(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:AbstractBaseNurbsConversion(file, name, parent, "parentTessellate", shared, create){}
25
virtual ~ParentTessellate(){}
27
void setFormat(unsigned int f)
30
fprintf(mFile,"\tsetAttr \".f\" %i;\n", f);
32
void setPolygonType(unsigned int pt)
35
fprintf(mFile,"\tsetAttr \".pt\" %i;\n", pt);
37
void setPolygonCount(int pc)
40
fprintf(mFile,"\tsetAttr \".pc\" %i;\n", pc);
42
void setChordHeightRatio(double chr)
44
if(chr == 0.983) return;
45
fprintf(mFile,"\tsetAttr \".chr\" %f;\n", chr);
47
void setPre70ChordHeightRatio(bool pchr)
49
if(pchr == false) return;
50
fprintf(mFile,"\tsetAttr \".pchr\" %i;\n", pchr);
52
void setFractionalTolerance(double ft)
54
if(ft == 0.01) return;
55
fprintf(mFile,"\tsetAttr \".ft\" %f;\n", ft);
57
void setMinEdgeLength(double mel)
60
fprintf(mFile,"\tsetAttr \".mel\" %f;\n", mel);
62
void setDelta(double d)
65
fprintf(mFile,"\tsetAttr \".d\" %f;\n", d);
67
void setUType(unsigned int ut)
70
fprintf(mFile,"\tsetAttr \".ut\" %i;\n", ut);
72
void setUNumber(int un)
75
fprintf(mFile,"\tsetAttr \".un\" %i;\n", un);
77
void setVType(unsigned int vt)
80
fprintf(mFile,"\tsetAttr \".vt\" %i;\n", vt);
82
void setVNumber(int vn)
85
fprintf(mFile,"\tsetAttr \".vn\" %i;\n", vn);
87
void setUseChordHeight(bool uch)
89
if(uch == false) return;
90
fprintf(mFile,"\tsetAttr \".uch\" %i;\n", uch);
92
void setUseChordHeightRatio(bool ucr)
94
if(ucr == true) return;
95
fprintf(mFile,"\tsetAttr \".ucr\" %i;\n", ucr);
97
void setChordHeight(double cht)
100
fprintf(mFile,"\tsetAttr \".cht\" %f;\n", cht);
102
void setEdgeSwap(bool es)
104
if(es == false) return;
105
fprintf(mFile,"\tsetAttr \".es\" %i;\n", es);
107
void setMatchNormalDir(bool mnd)
109
if(mnd == false) return;
110
fprintf(mFile,"\tsetAttr \".mnd\" %i;\n", mnd);
112
void setNormalizeTrimmedUVRange(bool ntr)
114
if(ntr == true) return;
115
fprintf(mFile,"\tsetAttr \".ntr\" %i;\n", ntr);
117
void getFormat()const
119
fprintf(mFile,"\"%s.f\"",mName.c_str());
121
void getPolygonType()const
123
fprintf(mFile,"\"%s.pt\"",mName.c_str());
125
void getPolygonCount()const
127
fprintf(mFile,"\"%s.pc\"",mName.c_str());
129
void getChordHeightRatio()const
131
fprintf(mFile,"\"%s.chr\"",mName.c_str());
133
void getPre70ChordHeightRatio()const
135
fprintf(mFile,"\"%s.pchr\"",mName.c_str());
137
void getFractionalTolerance()const
139
fprintf(mFile,"\"%s.ft\"",mName.c_str());
141
void getMinEdgeLength()const
143
fprintf(mFile,"\"%s.mel\"",mName.c_str());
147
fprintf(mFile,"\"%s.d\"",mName.c_str());
151
fprintf(mFile,"\"%s.ut\"",mName.c_str());
153
void getUNumber()const
155
fprintf(mFile,"\"%s.un\"",mName.c_str());
159
fprintf(mFile,"\"%s.vt\"",mName.c_str());
161
void getVNumber()const
163
fprintf(mFile,"\"%s.vn\"",mName.c_str());
165
void getUseChordHeight()const
167
fprintf(mFile,"\"%s.uch\"",mName.c_str());
169
void getUseChordHeightRatio()const
171
fprintf(mFile,"\"%s.ucr\"",mName.c_str());
173
void getChordHeight()const
175
fprintf(mFile,"\"%s.cht\"",mName.c_str());
177
void getEdgeSwap()const
179
fprintf(mFile,"\"%s.es\"",mName.c_str());
181
void getMatchNormalDir()const
183
fprintf(mFile,"\"%s.mnd\"",mName.c_str());
185
void getNormalizeTrimmedUVRange()const
187
fprintf(mFile,"\"%s.ntr\"",mName.c_str());
189
void getOutputPolygon()const
191
fprintf(mFile,"\"%s.op\"",mName.c_str());
194
ParentTessellate(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
195
:AbstractBaseNurbsConversion(file, name, parent, nodeType, shared, create) {}
199
#endif//__MayaDM_PARENTTESSELLATE_H__