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

« back to all changes in this revision

Viewing changes to Externals/MayaDataModel/include/MayaDMMakeNurbCube.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_MAKENURBCUBE_H__
 
11
#define __MayaDM_MAKENURBCUBE_H__
 
12
#include "MayaDMTypes.h"
 
13
#include "MayaDMConnectables.h"
 
14
#include "MayaDMPrimitive.h"
 
15
namespace MayaDM
 
16
{
 
17
class MakeNurbCube : public Primitive
 
18
{
 
19
public:
 
20
public:
 
21
 
 
22
        MakeNurbCube():Primitive(){}
 
23
        MakeNurbCube(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
 
24
                :Primitive(file, name, parent, "makeNurbCube", shared, create){}
 
25
        virtual ~MakeNurbCube(){}
 
26
 
 
27
        void setWidth(double w)
 
28
        {
 
29
                if(w == 1) return;
 
30
                fprintf(mFile,"\tsetAttr \".w\" %f;\n", w);
 
31
        }
 
32
        void setLengthRatio(double lr)
 
33
        {
 
34
                if(lr == 1.0) return;
 
35
                fprintf(mFile,"\tsetAttr \".lr\" %f;\n", lr);
 
36
        }
 
37
        void setHeightRatio(double hr)
 
38
        {
 
39
                if(hr == 1.0) return;
 
40
                fprintf(mFile,"\tsetAttr \".hr\" %f;\n", hr);
 
41
        }
 
42
        void setPatchesU(int u)
 
43
        {
 
44
                if(u == 1) return;
 
45
                fprintf(mFile,"\tsetAttr \".u\" %i;\n", u);
 
46
        }
 
47
        void setPatchesV(int v)
 
48
        {
 
49
                if(v == 1) return;
 
50
                fprintf(mFile,"\tsetAttr \".v\" %i;\n", v);
 
51
        }
 
52
        void setDegree(unsigned int d)
 
53
        {
 
54
                if(d == 3) return;
 
55
                fprintf(mFile,"\tsetAttr \".d\" %i;\n", d);
 
56
        }
 
57
        void getWidth()const
 
58
        {
 
59
                fprintf(mFile,"\"%s.w\"",mName.c_str());
 
60
        }
 
61
        void getLengthRatio()const
 
62
        {
 
63
                fprintf(mFile,"\"%s.lr\"",mName.c_str());
 
64
        }
 
65
        void getHeightRatio()const
 
66
        {
 
67
                fprintf(mFile,"\"%s.hr\"",mName.c_str());
 
68
        }
 
69
        void getPatchesU()const
 
70
        {
 
71
                fprintf(mFile,"\"%s.u\"",mName.c_str());
 
72
        }
 
73
        void getPatchesV()const
 
74
        {
 
75
                fprintf(mFile,"\"%s.v\"",mName.c_str());
 
76
        }
 
77
        void getDegree()const
 
78
        {
 
79
                fprintf(mFile,"\"%s.d\"",mName.c_str());
 
80
        }
 
81
        void getOutputSurface1()const
 
82
        {
 
83
                fprintf(mFile,"\"%s.os1\"",mName.c_str());
 
84
        }
 
85
        void getOutputSurface2()const
 
86
        {
 
87
                fprintf(mFile,"\"%s.os2\"",mName.c_str());
 
88
        }
 
89
        void getOutputSurface3()const
 
90
        {
 
91
                fprintf(mFile,"\"%s.os3\"",mName.c_str());
 
92
        }
 
93
        void getOutputSurface4()const
 
94
        {
 
95
                fprintf(mFile,"\"%s.os4\"",mName.c_str());
 
96
        }
 
97
        void getOutputSurface5()const
 
98
        {
 
99
                fprintf(mFile,"\"%s.os5\"",mName.c_str());
 
100
        }
 
101
protected:
 
102
        MakeNurbCube(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
 
103
                :Primitive(file, name, parent, nodeType, shared, create) {}
 
104
 
 
105
};
 
106
}//namespace MayaDM
 
107
#endif//__MayaDM_MAKENURBCUBE_H__