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_FILTERSIMPLIFY_H__
11
#define __MayaDM_FILTERSIMPLIFY_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMFilter.h"
17
class FilterSimplify : public Filter
22
FilterSimplify():Filter(){}
23
FilterSimplify(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:Filter(file, name, parent, "filterSimplify", shared, create){}
25
virtual ~FilterSimplify(){}
27
void setTolerance(double tol)
29
if(tol == 0.001) return;
30
fprintf(mFile,"\tsetAttr \".tol\" %f;\n", tol);
32
void setTimeTolerance(double tt)
34
if(tt == 0.00) return;
35
fprintf(mFile,"\tsetAttr \".tt\" %f;\n", tt);
37
void setMinTimeStep(double mnt)
39
if(mnt == 0.0) return;
40
fprintf(mFile,"\tsetAttr \".mnt\" %f;\n", mnt);
42
void setMaxTimeStep(double mxt)
44
if(mxt == 3600) return;
45
fprintf(mFile,"\tsetAttr \".mxt\" %f;\n", mxt);
47
void setAllowDuplicates(bool ad)
49
if(ad == true) return;
50
fprintf(mFile,"\tsetAttr \".ad\" %i;\n", ad);
52
void getTolerance()const
54
fprintf(mFile,"\"%s.tol\"",mName.c_str());
56
void getTimeTolerance()const
58
fprintf(mFile,"\"%s.tt\"",mName.c_str());
60
void getMinTimeStep()const
62
fprintf(mFile,"\"%s.mnt\"",mName.c_str());
64
void getMaxTimeStep()const
66
fprintf(mFile,"\"%s.mxt\"",mName.c_str());
68
void getAllowDuplicates()const
70
fprintf(mFile,"\"%s.ad\"",mName.c_str());
73
FilterSimplify(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
74
:Filter(file, name, parent, nodeType, shared, create) {}
78
#endif//__MayaDM_FILTERSIMPLIFY_H__