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

« back to all changes in this revision

Viewing changes to Externals/MayaDataModel/include/MayaDMCloseSurface.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_CLOSESURFACE_H__
 
11
#define __MayaDM_CLOSESURFACE_H__
 
12
#include "MayaDMTypes.h"
 
13
#include "MayaDMConnectables.h"
 
14
#include "MayaDMAbstractBaseCreate.h"
 
15
namespace MayaDM
 
16
{
 
17
class CloseSurface : public AbstractBaseCreate
 
18
{
 
19
public:
 
20
public:
 
21
 
 
22
        CloseSurface():AbstractBaseCreate(){}
 
23
        CloseSurface(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
 
24
                :AbstractBaseCreate(file, name, parent, "closeSurface", shared, create){}
 
25
        virtual ~CloseSurface(){}
 
26
 
 
27
        void setPreserveShape(unsigned int ps)
 
28
        {
 
29
                if(ps == 1) return;
 
30
                fprintf(mFile,"\tsetAttr \".ps\" %i;\n", ps);
 
31
        }
 
32
        void setBlendBias(double bb)
 
33
        {
 
34
                if(bb == 0.5) return;
 
35
                fprintf(mFile,"\tsetAttr \".bb\" %f;\n", bb);
 
36
        }
 
37
        void setBlendKnotInsertion(bool bki)
 
38
        {
 
39
                if(bki == false) return;
 
40
                fprintf(mFile,"\tsetAttr \".bki\" %i;\n", bki);
 
41
        }
 
42
        void setParameter(double p)
 
43
        {
 
44
                if(p == 0.1) return;
 
45
                fprintf(mFile,"\tsetAttr \".p\" %f;\n", p);
 
46
        }
 
47
        void setDirection(unsigned int d)
 
48
        {
 
49
                if(d == 0) return;
 
50
                fprintf(mFile,"\tsetAttr \".d\" %i;\n", d);
 
51
        }
 
52
        void getInputSurface()const
 
53
        {
 
54
                fprintf(mFile,"\"%s.is\"",mName.c_str());
 
55
        }
 
56
        void getPreserveShape()const
 
57
        {
 
58
                fprintf(mFile,"\"%s.ps\"",mName.c_str());
 
59
        }
 
60
        void getBlendBias()const
 
61
        {
 
62
                fprintf(mFile,"\"%s.bb\"",mName.c_str());
 
63
        }
 
64
        void getBlendKnotInsertion()const
 
65
        {
 
66
                fprintf(mFile,"\"%s.bki\"",mName.c_str());
 
67
        }
 
68
        void getParameter()const
 
69
        {
 
70
                fprintf(mFile,"\"%s.p\"",mName.c_str());
 
71
        }
 
72
        void getDirection()const
 
73
        {
 
74
                fprintf(mFile,"\"%s.d\"",mName.c_str());
 
75
        }
 
76
        void getOutputSurface()const
 
77
        {
 
78
                fprintf(mFile,"\"%s.os\"",mName.c_str());
 
79
        }
 
80
protected:
 
81
        CloseSurface(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
 
82
                :AbstractBaseCreate(file, name, parent, nodeType, shared, create) {}
 
83
 
 
84
};
 
85
}//namespace MayaDM
 
86
#endif//__MayaDM_CLOSESURFACE_H__