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

« back to all changes in this revision

Viewing changes to Externals/MayaDataModel/include/MayaDMPolySmoothFace.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_POLYSMOOTHFACE_H__
 
11
#define __MayaDM_POLYSMOOTHFACE_H__
 
12
#include "MayaDMTypes.h"
 
13
#include "MayaDMConnectables.h"
 
14
#include "MayaDMPolyModifier.h"
 
15
namespace MayaDM
 
16
{
 
17
class PolySmoothFace : public PolyModifier
 
18
{
 
19
public:
 
20
public:
 
21
 
 
22
        PolySmoothFace():PolyModifier(){}
 
23
        PolySmoothFace(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
 
24
                :PolyModifier(file, name, parent, "polySmoothFace", shared, create){}
 
25
        virtual ~PolySmoothFace(){}
 
26
 
 
27
        void setMethod(unsigned int mth)
 
28
        {
 
29
                if(mth == 0) return;
 
30
                fprintf(mFile,"\tsetAttr \".mth\" %i;\n", mth);
 
31
        }
 
32
        void setContinuity(float c)
 
33
        {
 
34
                if(c == 1) return;
 
35
                fprintf(mFile,"\tsetAttr \".c\" %f;\n", c);
 
36
        }
 
37
        void setDivisions(short dv)
 
38
        {
 
39
                if(dv == 1) return;
 
40
                fprintf(mFile,"\tsetAttr \".dv\" %i;\n", dv);
 
41
        }
 
42
        void setSmoothUVs(bool suv)
 
43
        {
 
44
                if(suv == false) return;
 
45
                fprintf(mFile,"\tsetAttr \".suv\" %i;\n", suv);
 
46
        }
 
47
        void setKeepBorder(bool kb)
 
48
        {
 
49
                if(kb == true) return;
 
50
                fprintf(mFile,"\tsetAttr \".kb\" %i;\n", kb);
 
51
        }
 
52
        void setKeepSelectionBorder(bool ksb)
 
53
        {
 
54
                if(ksb == true) return;
 
55
                fprintf(mFile,"\tsetAttr \".ksb\" %i;\n", ksb);
 
56
        }
 
57
        void setKeepHardEdge(bool khe)
 
58
        {
 
59
                if(khe == false) return;
 
60
                fprintf(mFile,"\tsetAttr \".khe\" %i;\n", khe);
 
61
        }
 
62
        void setPropagateEdgeHardness(bool peh)
 
63
        {
 
64
                if(peh == false) return;
 
65
                fprintf(mFile,"\tsetAttr \".peh\" %i;\n", peh);
 
66
        }
 
67
        void setKeepMapBorders(unsigned int kmb)
 
68
        {
 
69
                if(kmb == 1) return;
 
70
                fprintf(mFile,"\tsetAttr \".kmb\" %i;\n", kmb);
 
71
        }
 
72
        void setKeepTessellation(bool kt)
 
73
        {
 
74
                if(kt == true) return;
 
75
                fprintf(mFile,"\tsetAttr \".kt\" %i;\n", kt);
 
76
        }
 
77
        void setSubdivisionLevels(int sl)
 
78
        {
 
79
                if(sl == 1) return;
 
80
                fprintf(mFile,"\tsetAttr \".sl\" %i;\n", sl);
 
81
        }
 
82
        void setDivisionsPerEdge(int dpe)
 
83
        {
 
84
                if(dpe == 1) return;
 
85
                fprintf(mFile,"\tsetAttr \".dpe\" %i;\n", dpe);
 
86
        }
 
87
        void setDegree(int deg)
 
88
        {
 
89
                if(deg == 3) return;
 
90
                fprintf(mFile,"\tsetAttr \".deg\" %i;\n", deg);
 
91
        }
 
92
        void setPushStrength(float ps)
 
93
        {
 
94
                if(ps == 0.0) return;
 
95
                fprintf(mFile,"\tsetAttr \".ps\" %f;\n", ps);
 
96
        }
 
97
        void setRoundness(float ro)
 
98
        {
 
99
                if(ro == 0) return;
 
100
                fprintf(mFile,"\tsetAttr \".ro\" %f;\n", ro);
 
101
        }
 
102
        void setMaya65Above(bool ma)
 
103
        {
 
104
                if(ma == false) return;
 
105
                fprintf(mFile,"\tsetAttr \".ma\" %i;\n", ma);
 
106
        }
 
107
        void setMaya2008Above(bool m08)
 
108
        {
 
109
                if(m08 == false) return;
 
110
                fprintf(mFile,"\tsetAttr \".m08\" %i;\n", m08);
 
111
        }
 
112
        void getMethod()const
 
113
        {
 
114
                fprintf(mFile,"\"%s.mth\"",mName.c_str());
 
115
        }
 
116
        void getContinuity()const
 
117
        {
 
118
                fprintf(mFile,"\"%s.c\"",mName.c_str());
 
119
        }
 
120
        void getDivisions()const
 
121
        {
 
122
                fprintf(mFile,"\"%s.dv\"",mName.c_str());
 
123
        }
 
124
        void getSmoothUVs()const
 
125
        {
 
126
                fprintf(mFile,"\"%s.suv\"",mName.c_str());
 
127
        }
 
128
        void getKeepBorder()const
 
129
        {
 
130
                fprintf(mFile,"\"%s.kb\"",mName.c_str());
 
131
        }
 
132
        void getKeepSelectionBorder()const
 
133
        {
 
134
                fprintf(mFile,"\"%s.ksb\"",mName.c_str());
 
135
        }
 
136
        void getKeepHardEdge()const
 
137
        {
 
138
                fprintf(mFile,"\"%s.khe\"",mName.c_str());
 
139
        }
 
140
        void getPropagateEdgeHardness()const
 
141
        {
 
142
                fprintf(mFile,"\"%s.peh\"",mName.c_str());
 
143
        }
 
144
        void getKeepMapBorders()const
 
145
        {
 
146
                fprintf(mFile,"\"%s.kmb\"",mName.c_str());
 
147
        }
 
148
        void getKeepTessellation()const
 
149
        {
 
150
                fprintf(mFile,"\"%s.kt\"",mName.c_str());
 
151
        }
 
152
        void getSubdivisionLevels()const
 
153
        {
 
154
                fprintf(mFile,"\"%s.sl\"",mName.c_str());
 
155
        }
 
156
        void getDivisionsPerEdge()const
 
157
        {
 
158
                fprintf(mFile,"\"%s.dpe\"",mName.c_str());
 
159
        }
 
160
        void getDegree()const
 
161
        {
 
162
                fprintf(mFile,"\"%s.deg\"",mName.c_str());
 
163
        }
 
164
        void getPushStrength()const
 
165
        {
 
166
                fprintf(mFile,"\"%s.ps\"",mName.c_str());
 
167
        }
 
168
        void getRoundness()const
 
169
        {
 
170
                fprintf(mFile,"\"%s.ro\"",mName.c_str());
 
171
        }
 
172
        void getMaya65Above()const
 
173
        {
 
174
                fprintf(mFile,"\"%s.ma\"",mName.c_str());
 
175
        }
 
176
        void getMaya2008Above()const
 
177
        {
 
178
                fprintf(mFile,"\"%s.m08\"",mName.c_str());
 
179
        }
 
180
protected:
 
181
        PolySmoothFace(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
 
182
                :PolyModifier(file, name, parent, nodeType, shared, create) {}
 
183
 
 
184
};
 
185
}//namespace MayaDM
 
186
#endif//__MayaDM_POLYSMOOTHFACE_H__