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

« back to all changes in this revision

Viewing changes to Externals/MayaDataModel/include/MayaDMDeformSine.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_DEFORMSINE_H__
 
11
#define __MayaDM_DEFORMSINE_H__
 
12
#include "MayaDMTypes.h"
 
13
#include "MayaDMConnectables.h"
 
14
#include "MayaDMDeformFunc.h"
 
15
namespace MayaDM
 
16
{
 
17
class DeformSine : public DeformFunc
 
18
{
 
19
public:
 
20
public:
 
21
 
 
22
        DeformSine():DeformFunc(){}
 
23
        DeformSine(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
 
24
                :DeformFunc(file, name, parent, "deformSine", shared, create){}
 
25
        virtual ~DeformSine(){}
 
26
 
 
27
        void setLowBound(double lb)
 
28
        {
 
29
                if(lb == -1.0) return;
 
30
                fprintf(mFile,"\tsetAttr \".lb\" %f;\n", lb);
 
31
        }
 
32
        void setHighBound(double hb)
 
33
        {
 
34
                if(hb == 1.0) return;
 
35
                fprintf(mFile,"\tsetAttr \".hb\" %f;\n", hb);
 
36
        }
 
37
        void setAmplitude(double amp)
 
38
        {
 
39
                if(amp == 0.0) return;
 
40
                fprintf(mFile,"\tsetAttr \".amp\" %f;\n", amp);
 
41
        }
 
42
        void setWavelength(double wav)
 
43
        {
 
44
                if(wav == 2.0) return;
 
45
                fprintf(mFile,"\tsetAttr \".wav\" %f;\n", wav);
 
46
        }
 
47
        void setDropoff(double dr)
 
48
        {
 
49
                if(dr == 0.0) return;
 
50
                fprintf(mFile,"\tsetAttr \".dr\" %f;\n", dr);
 
51
        }
 
52
        void setOffset(double off)
 
53
        {
 
54
                if(off == 0.0) return;
 
55
                fprintf(mFile,"\tsetAttr \".off\" %f;\n", off);
 
56
        }
 
57
        void getLowBound()const
 
58
        {
 
59
                fprintf(mFile,"\"%s.lb\"",mName.c_str());
 
60
        }
 
61
        void getHighBound()const
 
62
        {
 
63
                fprintf(mFile,"\"%s.hb\"",mName.c_str());
 
64
        }
 
65
        void getAmplitude()const
 
66
        {
 
67
                fprintf(mFile,"\"%s.amp\"",mName.c_str());
 
68
        }
 
69
        void getWavelength()const
 
70
        {
 
71
                fprintf(mFile,"\"%s.wav\"",mName.c_str());
 
72
        }
 
73
        void getDropoff()const
 
74
        {
 
75
                fprintf(mFile,"\"%s.dr\"",mName.c_str());
 
76
        }
 
77
        void getOffset()const
 
78
        {
 
79
                fprintf(mFile,"\"%s.off\"",mName.c_str());
 
80
        }
 
81
protected:
 
82
        DeformSine(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
 
83
                :DeformFunc(file, name, parent, nodeType, shared, create) {}
 
84
 
 
85
};
 
86
}//namespace MayaDM
 
87
#endif//__MayaDM_DEFORMSINE_H__