2
Copyright (c) 2008-2009 NetAllied Systems GmbH
4
This file is part of MayaDataModel.
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
10
#ifndef __MayaDM_INSTANCER_H__
11
#define __MayaDM_INSTANCER_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMTransform.h"
17
class Instancer : public Transform
22
Instancer():Transform(){}
23
Instancer(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:Transform(file, name, parent, "instancer", shared, create){}
25
virtual ~Instancer(){}
27
void setRotationOrder(unsigned int ror)
30
fprintf(mFile,"\tsetAttr \".ror\" %i;\n", ror);
32
void setRotationAngleUnits(unsigned int rau)
35
fprintf(mFile,"\tsetAttr \".rau\" %i;\n", rau);
37
void setCycle(unsigned int cyc)
40
fprintf(mFile,"\tsetAttr \".cyc\" %i;\n", cyc);
42
void setCycleStep(double cs)
45
fprintf(mFile,"\tsetAttr \".cs\" %f;\n", cs);
47
void setCycleStepUnit(unsigned int csu)
50
fprintf(mFile,"\tsetAttr \".csu\" %i;\n", csu);
52
void setLevelOfDetail(unsigned int lod)
55
fprintf(mFile,"\tsetAttr \".lod\" %i;\n", lod);
57
void getInputPoints()const
59
fprintf(mFile,"\"%s.inp\"",mName.c_str());
61
void getInputHierarchy(size_t inh_i)const
63
fprintf(mFile,"\"%s.inh[%i]\"",mName.c_str(),inh_i);
65
void getInputHierarchy()const
68
fprintf(mFile,"\"%s.inh\"",mName.c_str());
70
void getRotationOrder()const
72
fprintf(mFile,"\"%s.ror\"",mName.c_str());
74
void getRotationAngleUnits()const
76
fprintf(mFile,"\"%s.rau\"",mName.c_str());
80
fprintf(mFile,"\"%s.cyc\"",mName.c_str());
82
void getCycleStep()const
84
fprintf(mFile,"\"%s.cs\"",mName.c_str());
86
void getCycleStepUnit()const
88
fprintf(mFile,"\"%s.csu\"",mName.c_str());
90
void getLevelOfDetail()const
92
fprintf(mFile,"\"%s.lod\"",mName.c_str());
94
void getInstanceCount()const
96
fprintf(mFile,"\"%s.ic\"",mName.c_str());
98
void getHierarchyCount()const
100
fprintf(mFile,"\"%s.hc\"",mName.c_str());
103
Instancer(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
104
:Transform(file, name, parent, nodeType, shared, create) {}
108
#endif//__MayaDM_INSTANCER_H__