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

« back to all changes in this revision

Viewing changes to Externals/MayaDataModel/include/MayaDMParentTessellate.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_PARENTTESSELLATE_H__
 
11
#define __MayaDM_PARENTTESSELLATE_H__
 
12
#include "MayaDMTypes.h"
 
13
#include "MayaDMConnectables.h"
 
14
#include "MayaDMAbstractBaseNurbsConversion.h"
 
15
namespace MayaDM
 
16
{
 
17
class ParentTessellate : public AbstractBaseNurbsConversion
 
18
{
 
19
public:
 
20
public:
 
21
 
 
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(){}
 
26
 
 
27
        void setFormat(unsigned int f)
 
28
        {
 
29
                if(f == 1) return;
 
30
                fprintf(mFile,"\tsetAttr \".f\" %i;\n", f);
 
31
        }
 
32
        void setPolygonType(unsigned int pt)
 
33
        {
 
34
                if(pt == 0) return;
 
35
                fprintf(mFile,"\tsetAttr \".pt\" %i;\n", pt);
 
36
        }
 
37
        void setPolygonCount(int pc)
 
38
        {
 
39
                if(pc == 200) return;
 
40
                fprintf(mFile,"\tsetAttr \".pc\" %i;\n", pc);
 
41
        }
 
42
        void setChordHeightRatio(double chr)
 
43
        {
 
44
                if(chr == 0.983) return;
 
45
                fprintf(mFile,"\tsetAttr \".chr\" %f;\n", chr);
 
46
        }
 
47
        void setPre70ChordHeightRatio(bool pchr)
 
48
        {
 
49
                if(pchr == false) return;
 
50
                fprintf(mFile,"\tsetAttr \".pchr\" %i;\n", pchr);
 
51
        }
 
52
        void setFractionalTolerance(double ft)
 
53
        {
 
54
                if(ft == 0.01) return;
 
55
                fprintf(mFile,"\tsetAttr \".ft\" %f;\n", ft);
 
56
        }
 
57
        void setMinEdgeLength(double mel)
 
58
        {
 
59
                if(mel == 0) return;
 
60
                fprintf(mFile,"\tsetAttr \".mel\" %f;\n", mel);
 
61
        }
 
62
        void setDelta(double d)
 
63
        {
 
64
                if(d == 0) return;
 
65
                fprintf(mFile,"\tsetAttr \".d\" %f;\n", d);
 
66
        }
 
67
        void setUType(unsigned int ut)
 
68
        {
 
69
                if(ut == 3) return;
 
70
                fprintf(mFile,"\tsetAttr \".ut\" %i;\n", ut);
 
71
        }
 
72
        void setUNumber(int un)
 
73
        {
 
74
                if(un == 3) return;
 
75
                fprintf(mFile,"\tsetAttr \".un\" %i;\n", un);
 
76
        }
 
77
        void setVType(unsigned int vt)
 
78
        {
 
79
                if(vt == 3) return;
 
80
                fprintf(mFile,"\tsetAttr \".vt\" %i;\n", vt);
 
81
        }
 
82
        void setVNumber(int vn)
 
83
        {
 
84
                if(vn == 3) return;
 
85
                fprintf(mFile,"\tsetAttr \".vn\" %i;\n", vn);
 
86
        }
 
87
        void setUseChordHeight(bool uch)
 
88
        {
 
89
                if(uch == false) return;
 
90
                fprintf(mFile,"\tsetAttr \".uch\" %i;\n", uch);
 
91
        }
 
92
        void setUseChordHeightRatio(bool ucr)
 
93
        {
 
94
                if(ucr == true) return;
 
95
                fprintf(mFile,"\tsetAttr \".ucr\" %i;\n", ucr);
 
96
        }
 
97
        void setChordHeight(double cht)
 
98
        {
 
99
                if(cht == 0) return;
 
100
                fprintf(mFile,"\tsetAttr \".cht\" %f;\n", cht);
 
101
        }
 
102
        void setEdgeSwap(bool es)
 
103
        {
 
104
                if(es == false) return;
 
105
                fprintf(mFile,"\tsetAttr \".es\" %i;\n", es);
 
106
        }
 
107
        void setMatchNormalDir(bool mnd)
 
108
        {
 
109
                if(mnd == false) return;
 
110
                fprintf(mFile,"\tsetAttr \".mnd\" %i;\n", mnd);
 
111
        }
 
112
        void setNormalizeTrimmedUVRange(bool ntr)
 
113
        {
 
114
                if(ntr == true) return;
 
115
                fprintf(mFile,"\tsetAttr \".ntr\" %i;\n", ntr);
 
116
        }
 
117
        void getFormat()const
 
118
        {
 
119
                fprintf(mFile,"\"%s.f\"",mName.c_str());
 
120
        }
 
121
        void getPolygonType()const
 
122
        {
 
123
                fprintf(mFile,"\"%s.pt\"",mName.c_str());
 
124
        }
 
125
        void getPolygonCount()const
 
126
        {
 
127
                fprintf(mFile,"\"%s.pc\"",mName.c_str());
 
128
        }
 
129
        void getChordHeightRatio()const
 
130
        {
 
131
                fprintf(mFile,"\"%s.chr\"",mName.c_str());
 
132
        }
 
133
        void getPre70ChordHeightRatio()const
 
134
        {
 
135
                fprintf(mFile,"\"%s.pchr\"",mName.c_str());
 
136
        }
 
137
        void getFractionalTolerance()const
 
138
        {
 
139
                fprintf(mFile,"\"%s.ft\"",mName.c_str());
 
140
        }
 
141
        void getMinEdgeLength()const
 
142
        {
 
143
                fprintf(mFile,"\"%s.mel\"",mName.c_str());
 
144
        }
 
145
        void getDelta()const
 
146
        {
 
147
                fprintf(mFile,"\"%s.d\"",mName.c_str());
 
148
        }
 
149
        void getUType()const
 
150
        {
 
151
                fprintf(mFile,"\"%s.ut\"",mName.c_str());
 
152
        }
 
153
        void getUNumber()const
 
154
        {
 
155
                fprintf(mFile,"\"%s.un\"",mName.c_str());
 
156
        }
 
157
        void getVType()const
 
158
        {
 
159
                fprintf(mFile,"\"%s.vt\"",mName.c_str());
 
160
        }
 
161
        void getVNumber()const
 
162
        {
 
163
                fprintf(mFile,"\"%s.vn\"",mName.c_str());
 
164
        }
 
165
        void getUseChordHeight()const
 
166
        {
 
167
                fprintf(mFile,"\"%s.uch\"",mName.c_str());
 
168
        }
 
169
        void getUseChordHeightRatio()const
 
170
        {
 
171
                fprintf(mFile,"\"%s.ucr\"",mName.c_str());
 
172
        }
 
173
        void getChordHeight()const
 
174
        {
 
175
                fprintf(mFile,"\"%s.cht\"",mName.c_str());
 
176
        }
 
177
        void getEdgeSwap()const
 
178
        {
 
179
                fprintf(mFile,"\"%s.es\"",mName.c_str());
 
180
        }
 
181
        void getMatchNormalDir()const
 
182
        {
 
183
                fprintf(mFile,"\"%s.mnd\"",mName.c_str());
 
184
        }
 
185
        void getNormalizeTrimmedUVRange()const
 
186
        {
 
187
                fprintf(mFile,"\"%s.ntr\"",mName.c_str());
 
188
        }
 
189
        void getOutputPolygon()const
 
190
        {
 
191
                fprintf(mFile,"\"%s.op\"",mName.c_str());
 
192
        }
 
193
protected:
 
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) {}
 
196
 
 
197
};
 
198
}//namespace MayaDM
 
199
#endif//__MayaDM_PARENTTESSELLATE_H__