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_POLYMOVEEDGE_H__
11
#define __MayaDM_POLYMOVEEDGE_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMPolyMoveVertex.h"
17
class PolyMoveEdge : public PolyMoveVertex
22
PolyMoveEdge():PolyMoveVertex(){}
23
PolyMoveEdge(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:PolyMoveVertex(file, name, parent, "polyMoveEdge", shared, create){}
25
virtual ~PolyMoveEdge(){}
27
void setLocalRotate(const double3& lr)
29
if(lr == double3(0.0, 0.0, 0.0)) return;
30
fprintf(mFile,"\tsetAttr \".lr\" -type \"double3\" ");
34
void setLocalRotateX(double lrx)
37
fprintf(mFile,"\tsetAttr \".lr.lrx\" %f;\n", lrx);
39
void setLocalRotateY(double lry)
42
fprintf(mFile,"\tsetAttr \".lr.lry\" %f;\n", lry);
44
void setLocalRotateZ(double lrz)
47
fprintf(mFile,"\tsetAttr \".lr.lrz\" %f;\n", lrz);
49
void setLocalScale(const double3& ls)
51
if(ls == double3(1.0, 1.0, 1.0)) return;
52
fprintf(mFile,"\tsetAttr \".ls\" -type \"double3\" ");
56
void setLocalScaleX(double lsx)
58
if(lsx == 0.0) return;
59
fprintf(mFile,"\tsetAttr \".ls.lsx\" %f;\n", lsx);
61
void setLocalScaleY(double lsy)
63
if(lsy == 0.0) return;
64
fprintf(mFile,"\tsetAttr \".ls.lsy\" %f;\n", lsy);
66
void setLocalScaleZ(double lsz)
68
if(lsz == 0.0) return;
69
fprintf(mFile,"\tsetAttr \".ls.lsz\" %f;\n", lsz);
71
void setLocalCenter(unsigned int lc)
74
fprintf(mFile,"\tsetAttr \".lc\" %i;\n", lc);
76
void getLocalRotate()const
78
fprintf(mFile,"\"%s.lr\"",mName.c_str());
80
void getLocalRotateX()const
82
fprintf(mFile,"\"%s.lr.lrx\"",mName.c_str());
84
void getLocalRotateY()const
86
fprintf(mFile,"\"%s.lr.lry\"",mName.c_str());
88
void getLocalRotateZ()const
90
fprintf(mFile,"\"%s.lr.lrz\"",mName.c_str());
92
void getLocalScale()const
94
fprintf(mFile,"\"%s.ls\"",mName.c_str());
96
void getLocalScaleX()const
98
fprintf(mFile,"\"%s.ls.lsx\"",mName.c_str());
100
void getLocalScaleY()const
102
fprintf(mFile,"\"%s.ls.lsy\"",mName.c_str());
104
void getLocalScaleZ()const
106
fprintf(mFile,"\"%s.ls.lsz\"",mName.c_str());
108
void getLocalCenter()const
110
fprintf(mFile,"\"%s.lc\"",mName.c_str());
113
PolyMoveEdge(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
114
:PolyMoveVertex(file, name, parent, nodeType, shared, create) {}
118
#endif//__MayaDM_POLYMOVEEDGE_H__