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

« back to all changes in this revision

Viewing changes to Externals/MayaDataModel/include/MayaDMSubdLayoutUV.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_SUBDLAYOUTUV_H__
 
11
#define __MayaDM_SUBDLAYOUTUV_H__
 
12
#include "MayaDMTypes.h"
 
13
#include "MayaDMConnectables.h"
 
14
#include "MayaDMSubdModifierUV.h"
 
15
namespace MayaDM
 
16
{
 
17
class SubdLayoutUV : public SubdModifierUV
 
18
{
 
19
public:
 
20
public:
 
21
 
 
22
        SubdLayoutUV():SubdModifierUV(){}
 
23
        SubdLayoutUV(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
 
24
                :SubdModifierUV(file, name, parent, "subdLayoutUV", shared, create){}
 
25
        virtual ~SubdLayoutUV(){}
 
26
 
 
27
        void setSeparate(unsigned int se)
 
28
        {
 
29
                if(se == 0) return;
 
30
                fprintf(mFile,"\tsetAttr \".se\" %i;\n", se);
 
31
        }
 
32
        void setFlipReversed(bool fr)
 
33
        {
 
34
                if(fr == true) return;
 
35
                fprintf(mFile,"\tsetAttr \".fr\" %i;\n", fr);
 
36
        }
 
37
        void setLayout(unsigned int l)
 
38
        {
 
39
                if(l == 2) return;
 
40
                fprintf(mFile,"\tsetAttr \".l\" %i;\n", l);
 
41
        }
 
42
        void setPercentageSpace(float ps)
 
43
        {
 
44
                if(ps == 0) return;
 
45
                fprintf(mFile,"\tsetAttr \".ps\" %f;\n", ps);
 
46
        }
 
47
        void setScale(unsigned int sc)
 
48
        {
 
49
                if(sc == 1) return;
 
50
                fprintf(mFile,"\tsetAttr \".sc\" %i;\n", sc);
 
51
        }
 
52
        void setDenseLayout(bool dl)
 
53
        {
 
54
                if(dl == false) return;
 
55
                fprintf(mFile,"\tsetAttr \".dl\" %i;\n", dl);
 
56
        }
 
57
        void setRotateForBestFit(unsigned int rbf)
 
58
        {
 
59
                if(rbf == 0) return;
 
60
                fprintf(mFile,"\tsetAttr \".rbf\" %i;\n", rbf);
 
61
        }
 
62
        void setLayoutMethod(unsigned int lm)
 
63
        {
 
64
                if(lm == 0) return;
 
65
                fprintf(mFile,"\tsetAttr \".lm\" %i;\n", lm);
 
66
        }
 
67
        void getSeparate()const
 
68
        {
 
69
                fprintf(mFile,"\"%s.se\"",mName.c_str());
 
70
        }
 
71
        void getFlipReversed()const
 
72
        {
 
73
                fprintf(mFile,"\"%s.fr\"",mName.c_str());
 
74
        }
 
75
        void getLayout()const
 
76
        {
 
77
                fprintf(mFile,"\"%s.l\"",mName.c_str());
 
78
        }
 
79
        void getPercentageSpace()const
 
80
        {
 
81
                fprintf(mFile,"\"%s.ps\"",mName.c_str());
 
82
        }
 
83
        void getScale()const
 
84
        {
 
85
                fprintf(mFile,"\"%s.sc\"",mName.c_str());
 
86
        }
 
87
        void getDenseLayout()const
 
88
        {
 
89
                fprintf(mFile,"\"%s.dl\"",mName.c_str());
 
90
        }
 
91
        void getRotateForBestFit()const
 
92
        {
 
93
                fprintf(mFile,"\"%s.rbf\"",mName.c_str());
 
94
        }
 
95
        void getLayoutMethod()const
 
96
        {
 
97
                fprintf(mFile,"\"%s.lm\"",mName.c_str());
 
98
        }
 
99
protected:
 
100
        SubdLayoutUV(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
 
101
                :SubdModifierUV(file, name, parent, nodeType, shared, create) {}
 
102
 
 
103
};
 
104
}//namespace MayaDM
 
105
#endif//__MayaDM_SUBDLAYOUTUV_H__