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_FILTEREULER_H__
11
#define __MayaDM_FILTEREULER_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMFilter.h"
17
class FilterEuler : public Filter
22
FilterEuler():Filter(){}
23
FilterEuler(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:Filter(file, name, parent, "filterEuler", shared, create){}
25
virtual ~FilterEuler(){}
27
void setSmooth(unsigned int s)
30
fprintf(mFile,"\tsetAttr \".s\" %i;\n", s);
32
void setNearestTo(unsigned int nt)
35
fprintf(mFile,"\tsetAttr \".nt\" %i;\n", nt);
37
void setWeight(const double3& w)
39
if(w == double3(1.0, 1.0, 1.0)) return;
40
fprintf(mFile,"\tsetAttr \".w\" -type \"double3\" ");
44
void setWeightX(double wx)
47
fprintf(mFile,"\tsetAttr \".w.wx\" %f;\n", wx);
49
void setWeightY(double wy)
52
fprintf(mFile,"\tsetAttr \".w.wy\" %f;\n", wy);
54
void setWeightZ(double wz)
57
fprintf(mFile,"\tsetAttr \".w.wz\" %f;\n", wz);
59
void setEnableInitialRotation(bool eir)
61
if(eir == false) return;
62
fprintf(mFile,"\tsetAttr \".eir\" %i;\n", eir);
64
void setInitialRotation(const double3& ir)
66
if(ir == double3(0., 0., 0.)) return;
67
fprintf(mFile,"\tsetAttr \".ir\" -type \"double3\" ");
71
void setInitialRotationX(double irx)
74
fprintf(mFile,"\tsetAttr \".ir.irx\" %f;\n", irx);
76
void setInitialRotationY(double iry)
79
fprintf(mFile,"\tsetAttr \".ir.iry\" %f;\n", iry);
81
void setInitialRotationZ(double irz)
84
fprintf(mFile,"\tsetAttr \".ir.irz\" %f;\n", irz);
86
void setOutputUsageOpt(unsigned int use)
89
fprintf(mFile,"\tsetAttr \".use\" %i;\n", use);
93
fprintf(mFile,"\"%s.s\"",mName.c_str());
95
void getNearestTo()const
97
fprintf(mFile,"\"%s.nt\"",mName.c_str());
101
fprintf(mFile,"\"%s.w\"",mName.c_str());
103
void getWeightX()const
105
fprintf(mFile,"\"%s.w.wx\"",mName.c_str());
107
void getWeightY()const
109
fprintf(mFile,"\"%s.w.wy\"",mName.c_str());
111
void getWeightZ()const
113
fprintf(mFile,"\"%s.w.wz\"",mName.c_str());
115
void getEnableInitialRotation()const
117
fprintf(mFile,"\"%s.eir\"",mName.c_str());
119
void getInitialRotation()const
121
fprintf(mFile,"\"%s.ir\"",mName.c_str());
123
void getInitialRotationX()const
125
fprintf(mFile,"\"%s.ir.irx\"",mName.c_str());
127
void getInitialRotationY()const
129
fprintf(mFile,"\"%s.ir.iry\"",mName.c_str());
131
void getInitialRotationZ()const
133
fprintf(mFile,"\"%s.ir.irz\"",mName.c_str());
135
void getOutputUsageOpt()const
137
fprintf(mFile,"\"%s.use\"",mName.c_str());
140
FilterEuler(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
141
:Filter(file, name, parent, nodeType, shared, create) {}
145
#endif//__MayaDM_FILTEREULER_H__