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

« back to all changes in this revision

Viewing changes to Externals/MayaDataModel/include/MayaDMRbfSrf.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_RBFSRF_H__
 
11
#define __MayaDM_RBFSRF_H__
 
12
#include "MayaDMTypes.h"
 
13
#include "MayaDMConnectables.h"
 
14
#include "MayaDMAbstractBaseCreate.h"
 
15
namespace MayaDM
 
16
{
 
17
class RbfSrf : public AbstractBaseCreate
 
18
{
 
19
public:
 
20
public:
 
21
 
 
22
        RbfSrf():AbstractBaseCreate(){}
 
23
        RbfSrf(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
 
24
                :AbstractBaseCreate(file, name, parent, "rbfSrf", shared, create){}
 
25
        virtual ~RbfSrf(){}
 
26
 
 
27
        void setPrimaryRadius(double pr)
 
28
        {
 
29
                if(pr == 1) return;
 
30
                fprintf(mFile,"\tsetAttr \".pr\" %f;\n", pr);
 
31
        }
 
32
        void setSecondaryRadius(double sr)
 
33
        {
 
34
                if(sr == 1) return;
 
35
                fprintf(mFile,"\tsetAttr \".sr\" %f;\n", sr);
 
36
        }
 
37
        void setPositionTolerance(double pt)
 
38
        {
 
39
                if(pt == 0.01) return;
 
40
                fprintf(mFile,"\tsetAttr \".pt\" %f;\n", pt);
 
41
        }
 
42
        void setTangentTolerance(double tt)
 
43
        {
 
44
                if(tt == 0.01) return;
 
45
                fprintf(mFile,"\tsetAttr \".tt\" %f;\n", tt);
 
46
        }
 
47
        void getPrimarySurface()const
 
48
        {
 
49
                fprintf(mFile,"\"%s.ps\"",mName.c_str());
 
50
        }
 
51
        void getSecondarySurface()const
 
52
        {
 
53
                fprintf(mFile,"\"%s.ss\"",mName.c_str());
 
54
        }
 
55
        void getPrimaryRadius()const
 
56
        {
 
57
                fprintf(mFile,"\"%s.pr\"",mName.c_str());
 
58
        }
 
59
        void getSecondaryRadius()const
 
60
        {
 
61
                fprintf(mFile,"\"%s.sr\"",mName.c_str());
 
62
        }
 
63
        void getPositionTolerance()const
 
64
        {
 
65
                fprintf(mFile,"\"%s.pt\"",mName.c_str());
 
66
        }
 
67
        void getTangentTolerance()const
 
68
        {
 
69
                fprintf(mFile,"\"%s.tt\"",mName.c_str());
 
70
        }
 
71
        void getOutputSurface(size_t os_i)const
 
72
        {
 
73
                fprintf(mFile,"\"%s.os[%i]\"",mName.c_str(),os_i);
 
74
        }
 
75
        void getOutputSurface()const
 
76
        {
 
77
 
 
78
                fprintf(mFile,"\"%s.os\"",mName.c_str());
 
79
        }
 
80
        void getTrimCurveOnPrimary(size_t tcp_i)const
 
81
        {
 
82
                fprintf(mFile,"\"%s.tcp[%i]\"",mName.c_str(),tcp_i);
 
83
        }
 
84
        void getTrimCurveOnPrimary()const
 
85
        {
 
86
 
 
87
                fprintf(mFile,"\"%s.tcp\"",mName.c_str());
 
88
        }
 
89
        void getTrimCurveOnSecondary(size_t tcs_i)const
 
90
        {
 
91
                fprintf(mFile,"\"%s.tcs[%i]\"",mName.c_str(),tcs_i);
 
92
        }
 
93
        void getTrimCurveOnSecondary()const
 
94
        {
 
95
 
 
96
                fprintf(mFile,"\"%s.tcs\"",mName.c_str());
 
97
        }
 
98
protected:
 
99
        RbfSrf(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
 
100
                :AbstractBaseCreate(file, name, parent, nodeType, shared, create) {}
 
101
 
 
102
};
 
103
}//namespace MayaDM
 
104
#endif//__MayaDM_RBFSRF_H__