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_POINTMATRIXMULT_H__
11
#define __MayaDM_POINTMATRIXMULT_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMDependNode.h"
17
class PointMatrixMult : public DependNode
22
PointMatrixMult():DependNode(){}
23
PointMatrixMult(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:DependNode(file, name, parent, "pointMatrixMult", shared, create){}
25
virtual ~PointMatrixMult(){}
27
void setInPoint(const double3& ip)
29
fprintf(mFile,"\tsetAttr \".ip\" -type \"double3\" ");
33
void setInPointX(double ipx)
36
fprintf(mFile,"\tsetAttr \".ip.ipx\" %f;\n", ipx);
38
void setInPointY(double ipy)
41
fprintf(mFile,"\tsetAttr \".ip.ipy\" %f;\n", ipy);
43
void setInPointZ(double ipz)
46
fprintf(mFile,"\tsetAttr \".ip.ipz\" %f;\n", ipz);
48
void setInMatrix(const matrix& im)
50
if(im == identity) return;
51
fprintf(mFile,"\tsetAttr \".im\" -type \"matrix\" ");
55
void setVectorMultiply(bool vm)
57
if(vm == false) return;
58
fprintf(mFile,"\tsetAttr \".vm\" %i;\n", vm);
60
void getInPoint()const
62
fprintf(mFile,"\"%s.ip\"",mName.c_str());
64
void getInPointX()const
66
fprintf(mFile,"\"%s.ip.ipx\"",mName.c_str());
68
void getInPointY()const
70
fprintf(mFile,"\"%s.ip.ipy\"",mName.c_str());
72
void getInPointZ()const
74
fprintf(mFile,"\"%s.ip.ipz\"",mName.c_str());
76
void getInMatrix()const
78
fprintf(mFile,"\"%s.im\"",mName.c_str());
80
void getVectorMultiply()const
82
fprintf(mFile,"\"%s.vm\"",mName.c_str());
86
fprintf(mFile,"\"%s.o\"",mName.c_str());
88
void getOutputX()const
90
fprintf(mFile,"\"%s.o.ox\"",mName.c_str());
92
void getOutputY()const
94
fprintf(mFile,"\"%s.o.oy\"",mName.c_str());
96
void getOutputZ()const
98
fprintf(mFile,"\"%s.o.oz\"",mName.c_str());
101
PointMatrixMult(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
102
:DependNode(file, name, parent, nodeType, shared, create) {}
106
#endif//__MayaDM_POINTMATRIXMULT_H__