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

« back to all changes in this revision

Viewing changes to Externals/MayaDataModel/include/MayaDMGuide.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_GUIDE_H__
 
11
#define __MayaDM_GUIDE_H__
 
12
#include "MayaDMTypes.h"
 
13
#include "MayaDMConnectables.h"
 
14
#include "MayaDMDependNode.h"
 
15
namespace MayaDM
 
16
{
 
17
class Guide : public DependNode
 
18
{
 
19
public:
 
20
public:
 
21
 
 
22
        Guide():DependNode(){}
 
23
        Guide(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
 
24
                :DependNode(file, name, parent, "guide", shared, create){}
 
25
        virtual ~Guide(){}
 
26
 
 
27
        void setJointAboveMatrix(const matrix& am)
 
28
        {
 
29
                if(am == identity) return;
 
30
                fprintf(mFile,"\tsetAttr \".am\" -type \"matrix\" ");
 
31
                am.write(mFile);
 
32
                fprintf(mFile,";\n");
 
33
        }
 
34
        void setJointXformMatrix(const matrix& jm)
 
35
        {
 
36
                fprintf(mFile,"\tsetAttr \".jm\" -type \"matrix\" ");
 
37
                jm.write(mFile);
 
38
                fprintf(mFile,";\n");
 
39
        }
 
40
        void setJointBelowMatrix(const matrix& bm)
 
41
        {
 
42
                if(bm == identity) return;
 
43
                fprintf(mFile,"\tsetAttr \".bm\" -type \"matrix\" ");
 
44
                bm.write(mFile);
 
45
                fprintf(mFile,";\n");
 
46
        }
 
47
        void setJointGuideAxis(unsigned int ga)
 
48
        {
 
49
                if(ga == 0) return;
 
50
                fprintf(mFile,"\tsetAttr \".ga\" %i;\n", ga);
 
51
        }
 
52
        void getJointAboveMatrix()const
 
53
        {
 
54
                fprintf(mFile,"\"%s.am\"",mName.c_str());
 
55
        }
 
56
        void getJointXformMatrix()const
 
57
        {
 
58
                fprintf(mFile,"\"%s.jm\"",mName.c_str());
 
59
        }
 
60
        void getJointBelowMatrix()const
 
61
        {
 
62
                fprintf(mFile,"\"%s.bm\"",mName.c_str());
 
63
        }
 
64
        void getJointGuideAxis()const
 
65
        {
 
66
                fprintf(mFile,"\"%s.ga\"",mName.c_str());
 
67
        }
 
68
        void getBendVector()const
 
69
        {
 
70
                fprintf(mFile,"\"%s.bv\"",mName.c_str());
 
71
        }
 
72
        void getBendVectorX()const
 
73
        {
 
74
                fprintf(mFile,"\"%s.bv.bx\"",mName.c_str());
 
75
        }
 
76
        void getBendVectorY()const
 
77
        {
 
78
                fprintf(mFile,"\"%s.bv.by\"",mName.c_str());
 
79
        }
 
80
        void getBendVectorZ()const
 
81
        {
 
82
                fprintf(mFile,"\"%s.bv.bz\"",mName.c_str());
 
83
        }
 
84
        void getBendAngle()const
 
85
        {
 
86
                fprintf(mFile,"\"%s.ba\"",mName.c_str());
 
87
        }
 
88
        void getBendMagnitude()const
 
89
        {
 
90
                fprintf(mFile,"\"%s.mg\"",mName.c_str());
 
91
        }
 
92
        void getRotateX()const
 
93
        {
 
94
                fprintf(mFile,"\"%s.rx\"",mName.c_str());
 
95
        }
 
96
        void getRotateY()const
 
97
        {
 
98
                fprintf(mFile,"\"%s.ry\"",mName.c_str());
 
99
        }
 
100
        void getRotateZ()const
 
101
        {
 
102
                fprintf(mFile,"\"%s.rz\"",mName.c_str());
 
103
        }
 
104
        void getMaxXYZ()const
 
105
        {
 
106
                fprintf(mFile,"\"%s.ma\"",mName.c_str());
 
107
        }
 
108
        void getAutoGuide()const
 
109
        {
 
110
                fprintf(mFile,"\"%s.ag\"",mName.c_str());
 
111
        }
 
112
protected:
 
113
        Guide(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
 
114
                :DependNode(file, name, parent, nodeType, shared, create) {}
 
115
 
 
116
};
 
117
}//namespace MayaDM
 
118
#endif//__MayaDM_GUIDE_H__