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

« back to all changes in this revision

Viewing changes to Externals/MayaDataModel/include/MayaDMFurPointOnSubd.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_FURPOINTONSUBD_H__
 
11
#define __MayaDM_FURPOINTONSUBD_H__
 
12
#include "MayaDMTypes.h"
 
13
#include "MayaDMConnectables.h"
 
14
#include "MayaDMDependNode.h"
 
15
namespace MayaDM
 
16
{
 
17
class FurPointOnSubd : public DependNode
 
18
{
 
19
public:
 
20
        struct FaceFirst{
 
21
        };
 
22
        struct FaceSecond{
 
23
        };
 
24
public:
 
25
 
 
26
        FurPointOnSubd():DependNode(){}
 
27
        FurPointOnSubd(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
 
28
                :DependNode(file, name, parent, "furPointOnSubd", shared, create){}
 
29
        virtual ~FurPointOnSubd(){}
 
30
 
 
31
        void setRelative(bool rel)
 
32
        {
 
33
                if(rel == true) return;
 
34
                fprintf(mFile,"\tsetAttr \".rel\" %i;\n", rel);
 
35
        }
 
36
        void setUValue(double u)
 
37
        {
 
38
                if(u == 0.0) return;
 
39
                fprintf(mFile,"\tsetAttr \".u\" %f;\n", u);
 
40
        }
 
41
        void setVValue(double v)
 
42
        {
 
43
                if(v == 0.0) return;
 
44
                fprintf(mFile,"\tsetAttr \".v\" %f;\n", v);
 
45
        }
 
46
        void setPosition(const double3& p)
 
47
        {
 
48
                if(p == 0.0) return;
 
49
                fprintf(mFile,"\tsetAttr \".p\" -type \"double3\" ");
 
50
                p.write(mFile);
 
51
                fprintf(mFile,";\n");
 
52
        }
 
53
        void setPositionX(double px)
 
54
        {
 
55
                if(px == 0.0) return;
 
56
                fprintf(mFile,"\tsetAttr \".px\" %f;\n", px);
 
57
        }
 
58
        void setPositionY(double py)
 
59
        {
 
60
                if(py == 0.0) return;
 
61
                fprintf(mFile,"\tsetAttr \".py\" %f;\n", py);
 
62
        }
 
63
        void setPositionZ(double pz)
 
64
        {
 
65
                if(pz == 0.0) return;
 
66
                fprintf(mFile,"\tsetAttr \".pz\" %f;\n", pz);
 
67
        }
 
68
        void setNormal(const double3& n)
 
69
        {
 
70
                if(n == 0.0) return;
 
71
                fprintf(mFile,"\tsetAttr \".n\" -type \"double3\" ");
 
72
                n.write(mFile);
 
73
                fprintf(mFile,";\n");
 
74
        }
 
75
        void setNormalX(double nx)
 
76
        {
 
77
                if(nx == 0.0) return;
 
78
                fprintf(mFile,"\tsetAttr \".nx\" %f;\n", nx);
 
79
        }
 
80
        void setNormalY(double ny)
 
81
        {
 
82
                if(ny == 0.0) return;
 
83
                fprintf(mFile,"\tsetAttr \".ny\" %f;\n", ny);
 
84
        }
 
85
        void setNormalZ(double nz)
 
86
        {
 
87
                if(nz == 0.0) return;
 
88
                fprintf(mFile,"\tsetAttr \".nz\" %f;\n", nz);
 
89
        }
 
90
        void getSubd()const
 
91
        {
 
92
                fprintf(mFile,"\"%s.s\"",mName.c_str());
 
93
        }
 
94
        void getFaceFirst()const
 
95
        {
 
96
                fprintf(mFile,"\"%s.ff\"",mName.c_str());
 
97
        }
 
98
        void getFaceSecond()const
 
99
        {
 
100
                fprintf(mFile,"\"%s.fs\"",mName.c_str());
 
101
        }
 
102
        void getRelative()const
 
103
        {
 
104
                fprintf(mFile,"\"%s.rel\"",mName.c_str());
 
105
        }
 
106
        void getUValue()const
 
107
        {
 
108
                fprintf(mFile,"\"%s.u\"",mName.c_str());
 
109
        }
 
110
        void getVValue()const
 
111
        {
 
112
                fprintf(mFile,"\"%s.v\"",mName.c_str());
 
113
        }
 
114
        void getPosition()const
 
115
        {
 
116
                fprintf(mFile,"\"%s.p\"",mName.c_str());
 
117
        }
 
118
        void getPositionX()const
 
119
        {
 
120
                fprintf(mFile,"\"%s.px\"",mName.c_str());
 
121
        }
 
122
        void getPositionY()const
 
123
        {
 
124
                fprintf(mFile,"\"%s.py\"",mName.c_str());
 
125
        }
 
126
        void getPositionZ()const
 
127
        {
 
128
                fprintf(mFile,"\"%s.pz\"",mName.c_str());
 
129
        }
 
130
        void getNormal()const
 
131
        {
 
132
                fprintf(mFile,"\"%s.n\"",mName.c_str());
 
133
        }
 
134
        void getNormalX()const
 
135
        {
 
136
                fprintf(mFile,"\"%s.nx\"",mName.c_str());
 
137
        }
 
138
        void getNormalY()const
 
139
        {
 
140
                fprintf(mFile,"\"%s.ny\"",mName.c_str());
 
141
        }
 
142
        void getNormalZ()const
 
143
        {
 
144
                fprintf(mFile,"\"%s.nz\"",mName.c_str());
 
145
        }
 
146
protected:
 
147
        FurPointOnSubd(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
 
148
                :DependNode(file, name, parent, nodeType, shared, create) {}
 
149
 
 
150
};
 
151
}//namespace MayaDM
 
152
#endif//__MayaDM_FURPOINTONSUBD_H__