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

« back to all changes in this revision

Viewing changes to Externals/MayaDataModel/include/MayaDMJointFfd.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_JOINTFFD_H__
 
11
#define __MayaDM_JOINTFFD_H__
 
12
#include "MayaDMTypes.h"
 
13
#include "MayaDMConnectables.h"
 
14
#include "MayaDMFfd.h"
 
15
namespace MayaDM
 
16
{
 
17
class JointFfd : public Ffd
 
18
{
 
19
public:
 
20
public:
 
21
 
 
22
        JointFfd():Ffd(){}
 
23
        JointFfd(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
 
24
                :Ffd(file, name, parent, "jointFfd", shared, create){}
 
25
        virtual ~JointFfd(){}
 
26
 
 
27
        void setBaseLattice2Matrix(const matrix& b2)
 
28
        {
 
29
                if(b2 == identity) return;
 
30
                fprintf(mFile,"\tsetAttr \".b2\" -type \"matrix\" ");
 
31
                b2.write(mFile);
 
32
                fprintf(mFile,";\n");
 
33
        }
 
34
        void setUseComponentCache(bool uc)
 
35
        {
 
36
                if(uc == true) return;
 
37
                fprintf(mFile,"\tsetAttr \".uc\" %i;\n", uc);
 
38
        }
 
39
        void getBaseLattice2Matrix()const
 
40
        {
 
41
                fprintf(mFile,"\"%s.b2\"",mName.c_str());
 
42
        }
 
43
        void getGroupIdUpperBindSkin(size_t gu_i)const
 
44
        {
 
45
                fprintf(mFile,"\"%s.gu[%i]\"",mName.c_str(),gu_i);
 
46
        }
 
47
        void getGroupIdUpperBindSkin()const
 
48
        {
 
49
 
 
50
                fprintf(mFile,"\"%s.gu\"",mName.c_str());
 
51
        }
 
52
        void getGroupIdLowerBindSkin(size_t gl_i)const
 
53
        {
 
54
                fprintf(mFile,"\"%s.gl[%i]\"",mName.c_str(),gl_i);
 
55
        }
 
56
        void getGroupIdLowerBindSkin()const
 
57
        {
 
58
 
 
59
                fprintf(mFile,"\"%s.gl\"",mName.c_str());
 
60
        }
 
61
        void getUpperBindSkinNode()const
 
62
        {
 
63
                fprintf(mFile,"\"%s.ub\"",mName.c_str());
 
64
        }
 
65
        void getLowerBindSkinNode()const
 
66
        {
 
67
                fprintf(mFile,"\"%s.lb\"",mName.c_str());
 
68
        }
 
69
        void getUseComponentCache()const
 
70
        {
 
71
                fprintf(mFile,"\"%s.uc\"",mName.c_str());
 
72
        }
 
73
protected:
 
74
        JointFfd(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
 
75
                :Ffd(file, name, parent, nodeType, shared, create) {}
 
76
 
 
77
};
 
78
}//namespace MayaDM
 
79
#endif//__MayaDM_JOINTFFD_H__