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

« back to all changes in this revision

Viewing changes to Externals/MayaDataModel/include/MayaDMOffsetCos.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_OFFSETCOS_H__
 
11
#define __MayaDM_OFFSETCOS_H__
 
12
#include "MayaDMTypes.h"
 
13
#include "MayaDMConnectables.h"
 
14
#include "MayaDMAbstractBaseCreate.h"
 
15
namespace MayaDM
 
16
{
 
17
class OffsetCos : public AbstractBaseCreate
 
18
{
 
19
public:
 
20
public:
 
21
 
 
22
        OffsetCos():AbstractBaseCreate(){}
 
23
        OffsetCos(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
 
24
                :AbstractBaseCreate(file, name, parent, "offsetCos", shared, create){}
 
25
        virtual ~OffsetCos(){}
 
26
 
 
27
        void setCutLoop(bool cl)
 
28
        {
 
29
                if(cl == false) return;
 
30
                fprintf(mFile,"\tsetAttr \".cl\" %i;\n", cl);
 
31
        }
 
32
        void setConnectBreaks(unsigned int cb)
 
33
        {
 
34
                if(cb == 2) return;
 
35
                fprintf(mFile,"\tsetAttr \".cb\" %i;\n", cb);
 
36
        }
 
37
        void setDistance(double d)
 
38
        {
 
39
                if(d == 1) return;
 
40
                fprintf(mFile,"\tsetAttr \".d\" %f;\n", d);
 
41
        }
 
42
        void setTolerance(double tol)
 
43
        {
 
44
                if(tol == 0) return;
 
45
                fprintf(mFile,"\tsetAttr \".tol\" %f;\n", tol);
 
46
        }
 
47
        void setSubdivisionDensity(int sd)
 
48
        {
 
49
                if(sd == 5) return;
 
50
                fprintf(mFile,"\tsetAttr \".sd\" %i;\n", sd);
 
51
        }
 
52
        void setCheckPoints(short cp)
 
53
        {
 
54
                if(cp == 3) return;
 
55
                fprintf(mFile,"\tsetAttr \".cp\" %i;\n", cp);
 
56
        }
 
57
        void setStitch(bool st)
 
58
        {
 
59
                if(st == true) return;
 
60
                fprintf(mFile,"\tsetAttr \".st\" %i;\n", st);
 
61
        }
 
62
        void getInputCurve()const
 
63
        {
 
64
                fprintf(mFile,"\"%s.ic\"",mName.c_str());
 
65
        }
 
66
        void getCutLoop()const
 
67
        {
 
68
                fprintf(mFile,"\"%s.cl\"",mName.c_str());
 
69
        }
 
70
        void getConnectBreaks()const
 
71
        {
 
72
                fprintf(mFile,"\"%s.cb\"",mName.c_str());
 
73
        }
 
74
        void getDistance()const
 
75
        {
 
76
                fprintf(mFile,"\"%s.d\"",mName.c_str());
 
77
        }
 
78
        void getTolerance()const
 
79
        {
 
80
                fprintf(mFile,"\"%s.tol\"",mName.c_str());
 
81
        }
 
82
        void getSubdivisionDensity()const
 
83
        {
 
84
                fprintf(mFile,"\"%s.sd\"",mName.c_str());
 
85
        }
 
86
        void getCheckPoints()const
 
87
        {
 
88
                fprintf(mFile,"\"%s.cp\"",mName.c_str());
 
89
        }
 
90
        void getStitch()const
 
91
        {
 
92
                fprintf(mFile,"\"%s.st\"",mName.c_str());
 
93
        }
 
94
        void getOutputCurve(size_t oc_i)const
 
95
        {
 
96
                fprintf(mFile,"\"%s.oc[%i]\"",mName.c_str(),oc_i);
 
97
        }
 
98
        void getOutputCurve()const
 
99
        {
 
100
 
 
101
                fprintf(mFile,"\"%s.oc\"",mName.c_str());
 
102
        }
 
103
protected:
 
104
        OffsetCos(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
 
105
                :AbstractBaseCreate(file, name, parent, nodeType, shared, create) {}
 
106
 
 
107
};
 
108
}//namespace MayaDM
 
109
#endif//__MayaDM_OFFSETCOS_H__