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_FFBLENDSRF_H__ 11 #define __MayaDM_FFBLENDSRF_H__ 12 #include "MayaDMTypes.h" 13 #include "MayaDMConnectables.h" 14 #include "MayaDMAbstractBaseCreate.h" 15 namespace MayaDM 16 { 17 class FfBlendSrf : public AbstractBaseCreate 18 { 19 public: 20 public: 21 FfBlendSrf()22 FfBlendSrf():AbstractBaseCreate(){} 23 FfBlendSrf(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true) 24 :AbstractBaseCreate(file, name, parent, "ffBlendSrf", shared, create){} ~FfBlendSrf()25 virtual ~FfBlendSrf(){} 26 setMultipleKnots(bool mk)27 void setMultipleKnots(bool mk) 28 { 29 if(mk == true) return; 30 fprintf(mFile,"\tsetAttr \".mk\" %i;\n", mk); 31 } setPositionTolerance(double pt)32 void setPositionTolerance(double pt) 33 { 34 if(pt == 0.1) return; 35 fprintf(mFile,"\tsetAttr \".pt\" %f;\n", pt); 36 } setTangentTolerance(double tt)37 void setTangentTolerance(double tt) 38 { 39 if(tt == 0.1) return; 40 fprintf(mFile,"\tsetAttr \".tt\" %f;\n", tt); 41 } setAutoNormal(bool an)42 void setAutoNormal(bool an) 43 { 44 if(an == true) return; 45 fprintf(mFile,"\tsetAttr \".an\" %i;\n", an); 46 } setFlipLeftNormal(bool fln)47 void setFlipLeftNormal(bool fln) 48 { 49 if(fln == false) return; 50 fprintf(mFile,"\tsetAttr \".fln\" %i;\n", fln); 51 } setFlipRightNormal(bool frn)52 void setFlipRightNormal(bool frn) 53 { 54 if(frn == false) return; 55 fprintf(mFile,"\tsetAttr \".frn\" %i;\n", frn); 56 } setAutoAnchor(bool aa)57 void setAutoAnchor(bool aa) 58 { 59 if(aa == true) return; 60 fprintf(mFile,"\tsetAttr \".aa\" %i;\n", aa); 61 } setLeftAnchor(double la)62 void setLeftAnchor(double la) 63 { 64 if(la == 0.0) return; 65 fprintf(mFile,"\tsetAttr \".la\" %f;\n", la); 66 } setLeftStart(double ls)67 void setLeftStart(double ls) 68 { 69 if(ls == 0.0) return; 70 fprintf(mFile,"\tsetAttr \".ls\" %f;\n", ls); 71 } setLeftEnd(double le)72 void setLeftEnd(double le) 73 { 74 if(le == 1.0) return; 75 fprintf(mFile,"\tsetAttr \".le\" %f;\n", le); 76 } setReverseLeft(bool rvl)77 void setReverseLeft(bool rvl) 78 { 79 if(rvl == false) return; 80 fprintf(mFile,"\tsetAttr \".rvl\" %i;\n", rvl); 81 } setRightAnchor(double ra)82 void setRightAnchor(double ra) 83 { 84 if(ra == 0.0) return; 85 fprintf(mFile,"\tsetAttr \".ra\" %f;\n", ra); 86 } setRightStart(double rs)87 void setRightStart(double rs) 88 { 89 if(rs == 0.0) return; 90 fprintf(mFile,"\tsetAttr \".rs\" %f;\n", rs); 91 } setRightEnd(double re)92 void setRightEnd(double re) 93 { 94 if(re == 1.0) return; 95 fprintf(mFile,"\tsetAttr \".re\" %f;\n", re); 96 } setReverseRight(bool rvr)97 void setReverseRight(bool rvr) 98 { 99 if(rvr == false) return; 100 fprintf(mFile,"\tsetAttr \".rvr\" %i;\n", rvr); 101 } getLeftCurve(size_t lc_i)102 void getLeftCurve(size_t lc_i)const 103 { 104 fprintf(mFile,"\"%s.lc[%i]\"",mName.c_str(),lc_i); 105 } getLeftCurve()106 void getLeftCurve()const 107 { 108 109 fprintf(mFile,"\"%s.lc\"",mName.c_str()); 110 } getRightCurve(size_t rc_i)111 void getRightCurve(size_t rc_i)const 112 { 113 fprintf(mFile,"\"%s.rc[%i]\"",mName.c_str(),rc_i); 114 } getRightCurve()115 void getRightCurve()const 116 { 117 118 fprintf(mFile,"\"%s.rc\"",mName.c_str()); 119 } getLeftRail()120 void getLeftRail()const 121 { 122 fprintf(mFile,"\"%s.lr\"",mName.c_str()); 123 } getRightRail()124 void getRightRail()const 125 { 126 fprintf(mFile,"\"%s.rr\"",mName.c_str()); 127 } getMultipleKnots()128 void getMultipleKnots()const 129 { 130 fprintf(mFile,"\"%s.mk\"",mName.c_str()); 131 } getPositionTolerance()132 void getPositionTolerance()const 133 { 134 fprintf(mFile,"\"%s.pt\"",mName.c_str()); 135 } getTangentTolerance()136 void getTangentTolerance()const 137 { 138 fprintf(mFile,"\"%s.tt\"",mName.c_str()); 139 } getAutoNormal()140 void getAutoNormal()const 141 { 142 fprintf(mFile,"\"%s.an\"",mName.c_str()); 143 } getFlipLeftNormal()144 void getFlipLeftNormal()const 145 { 146 fprintf(mFile,"\"%s.fln\"",mName.c_str()); 147 } getFlipRightNormal()148 void getFlipRightNormal()const 149 { 150 fprintf(mFile,"\"%s.frn\"",mName.c_str()); 151 } getAutoAnchor()152 void getAutoAnchor()const 153 { 154 fprintf(mFile,"\"%s.aa\"",mName.c_str()); 155 } getLeftAnchor()156 void getLeftAnchor()const 157 { 158 fprintf(mFile,"\"%s.la\"",mName.c_str()); 159 } getLeftStart()160 void getLeftStart()const 161 { 162 fprintf(mFile,"\"%s.ls\"",mName.c_str()); 163 } getLeftEnd()164 void getLeftEnd()const 165 { 166 fprintf(mFile,"\"%s.le\"",mName.c_str()); 167 } getReverseLeft()168 void getReverseLeft()const 169 { 170 fprintf(mFile,"\"%s.rvl\"",mName.c_str()); 171 } getRightAnchor()172 void getRightAnchor()const 173 { 174 fprintf(mFile,"\"%s.ra\"",mName.c_str()); 175 } getRightStart()176 void getRightStart()const 177 { 178 fprintf(mFile,"\"%s.rs\"",mName.c_str()); 179 } getRightEnd()180 void getRightEnd()const 181 { 182 fprintf(mFile,"\"%s.re\"",mName.c_str()); 183 } getReverseRight()184 void getReverseRight()const 185 { 186 fprintf(mFile,"\"%s.rvr\"",mName.c_str()); 187 } getOutputSurface()188 void getOutputSurface()const 189 { 190 fprintf(mFile,"\"%s.os\"",mName.c_str()); 191 } 192 protected: 193 FfBlendSrf(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true) AbstractBaseCreate(file,name,parent,nodeType,shared,create)194 :AbstractBaseCreate(file, name, parent, nodeType, shared, create) {} 195 196 }; 197 }//namespace MayaDM 198 #endif//__MayaDM_FFBLENDSRF_H__ 199