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

« back to all changes in this revision

Viewing changes to Externals/MayaDataModel/include/MayaDMMakeGroup.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_MAKEGROUP_H__
 
11
#define __MayaDM_MAKEGROUP_H__
 
12
#include "MayaDMTypes.h"
 
13
#include "MayaDMConnectables.h"
 
14
#include "MayaDMDependNode.h"
 
15
namespace MayaDM
 
16
{
 
17
class MakeGroup : public DependNode
 
18
{
 
19
public:
 
20
public:
 
21
 
 
22
        MakeGroup():DependNode(){}
 
23
        MakeGroup(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
 
24
                :DependNode(file, name, parent, "makeGroup", shared, create){}
 
25
        virtual ~MakeGroup(){}
 
26
 
 
27
        void setGroupType(unsigned int gt)
 
28
        {
 
29
                if(gt == 0) return;
 
30
                fprintf(mFile,"\tsetAttr \".gt\" %i;\n", gt);
 
31
        }
 
32
        void setGroupName(int gn)
 
33
        {
 
34
                if(gn == -1) return;
 
35
                fprintf(mFile,"\tsetAttr \".gn\" %i;\n", gn);
 
36
        }
 
37
        void setElemList(const intArray& el)
 
38
        {
 
39
                if(el.size == 0) return;
 
40
                fprintf(mFile,"\tsetAttr \".el\" -type \"intArray\" ");
 
41
                el.write(mFile);
 
42
                fprintf(mFile,";\n");
 
43
        }
 
44
        void setInputComponents(const componentList& ic)
 
45
        {
 
46
                fprintf(mFile,"\tsetAttr \".ic\" -type \"componentList\" ");
 
47
                ic.write(mFile);
 
48
                fprintf(mFile,";\n");
 
49
        }
 
50
        void getInputGeometry()const
 
51
        {
 
52
                fprintf(mFile,"\"%s.ig\"",mName.c_str());
 
53
        }
 
54
        void getOutputGeometry()const
 
55
        {
 
56
                fprintf(mFile,"\"%s.og\"",mName.c_str());
 
57
        }
 
58
        void getGroupType()const
 
59
        {
 
60
                fprintf(mFile,"\"%s.gt\"",mName.c_str());
 
61
        }
 
62
        void getGroupName()const
 
63
        {
 
64
                fprintf(mFile,"\"%s.gn\"",mName.c_str());
 
65
        }
 
66
        void getElemList()const
 
67
        {
 
68
                fprintf(mFile,"\"%s.el\"",mName.c_str());
 
69
        }
 
70
        void getInputComponents()const
 
71
        {
 
72
                fprintf(mFile,"\"%s.ic\"",mName.c_str());
 
73
        }
 
74
protected:
 
75
        MakeGroup(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
 
76
                :DependNode(file, name, parent, nodeType, shared, create) {}
 
77
 
 
78
};
 
79
}//namespace MayaDM
 
80
#endif//__MayaDM_MAKEGROUP_H__