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_POLYUNITE_H__
11 #define __MayaDM_POLYUNITE_H__
12 #include "MayaDMTypes.h"
13 #include "MayaDMConnectables.h"
14 #include "MayaDMPolyCreator.h"
15 namespace MayaDM
16 {
17 class PolyUnite : public PolyCreator
18 {
19 public:
20 public:
21 
PolyUnite()22 	PolyUnite():PolyCreator(){}
23 	PolyUnite(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24 		:PolyCreator(file, name, parent, "polyUnite", shared, create){}
~PolyUnite()25 	virtual ~PolyUnite(){}
26 
setUseOldPolyArchitecture(bool uopa)27 	void setUseOldPolyArchitecture(bool uopa)
28 	{
29 		if(uopa == false) return;
30 		fprintf(mFile,"\tsetAttr \".uopa\" %i;\n", uopa);
31 	}
getInputPoly(size_t ip_i)32 	void getInputPoly(size_t ip_i)const
33 	{
34 		fprintf(mFile,"\"%s.ip[%i]\"",mName.c_str(),ip_i);
35 	}
getInputPoly()36 	void getInputPoly()const
37 	{
38 
39 		fprintf(mFile,"\"%s.ip\"",mName.c_str());
40 	}
getInputMat(size_t im_i)41 	void getInputMat(size_t im_i)const
42 	{
43 		fprintf(mFile,"\"%s.im[%i]\"",mName.c_str(),im_i);
44 	}
getInputMat()45 	void getInputMat()const
46 	{
47 
48 		fprintf(mFile,"\"%s.im\"",mName.c_str());
49 	}
50 protected:
51 	PolyUnite(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
PolyCreator(file,name,parent,nodeType,shared,create)52 		:PolyCreator(file, name, parent, nodeType, shared, create) {}
53 
54 };
55 }//namespace MayaDM
56 #endif//__MayaDM_POLYUNITE_H__
57