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_BUMP3D_H__
11 #define __MayaDM_BUMP3D_H__
12 #include "MayaDMTypes.h"
13 #include "MayaDMConnectables.h"
14 #include "MayaDMDependNode.h"
15 namespace MayaDM
16 {
17 class Bump3d : public DependNode
18 {
19 public:
20 public:
21 
Bump3d()22 	Bump3d():DependNode(){}
23 	Bump3d(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24 		:DependNode(file, name, parent, "bump3d", shared, create){}
~Bump3d()25 	virtual ~Bump3d(){}
26 
setXPixelAngle(float xpa)27 	void setXPixelAngle(float xpa)
28 	{
29 		if(xpa == 0.002053) return;
30 		fprintf(mFile,"\tsetAttr \".xpa\" %f;\n", xpa);
31 	}
setBumpDepth(float bd)32 	void setBumpDepth(float bd)
33 	{
34 		if(bd == 1.0) return;
35 		fprintf(mFile,"\tsetAttr \".bd\" %f;\n", bd);
36 	}
setBumpFilter(float bf)37 	void setBumpFilter(float bf)
38 	{
39 		if(bf == 1.0) return;
40 		fprintf(mFile,"\tsetAttr \".bf\" %f;\n", bf);
41 	}
setBumpFilterOffset(float bfo)42 	void setBumpFilterOffset(float bfo)
43 	{
44 		if(bfo == 0.0) return;
45 		fprintf(mFile,"\tsetAttr \".bfo\" %f;\n", bfo);
46 	}
setBumpValue(float bv)47 	void setBumpValue(float bv)
48 	{
49 		if(bv == 0.0) return;
50 		fprintf(mFile,"\tsetAttr \".bv\" %f;\n", bv);
51 	}
getPointCamera()52 	void getPointCamera()const
53 	{
54 		fprintf(mFile,"\"%s.p\"",mName.c_str());
55 	}
getPointCameraX()56 	void getPointCameraX()const
57 	{
58 		fprintf(mFile,"\"%s.p.px\"",mName.c_str());
59 	}
getPointCameraY()60 	void getPointCameraY()const
61 	{
62 		fprintf(mFile,"\"%s.p.py\"",mName.c_str());
63 	}
getPointCameraZ()64 	void getPointCameraZ()const
65 	{
66 		fprintf(mFile,"\"%s.p.pz\"",mName.c_str());
67 	}
getPointObj()68 	void getPointObj()const
69 	{
70 		fprintf(mFile,"\"%s.po\"",mName.c_str());
71 	}
getPointObjX()72 	void getPointObjX()const
73 	{
74 		fprintf(mFile,"\"%s.po.pox\"",mName.c_str());
75 	}
getPointObjY()76 	void getPointObjY()const
77 	{
78 		fprintf(mFile,"\"%s.po.poy\"",mName.c_str());
79 	}
getPointObjZ()80 	void getPointObjZ()const
81 	{
82 		fprintf(mFile,"\"%s.po.poz\"",mName.c_str());
83 	}
getRefPointObj()84 	void getRefPointObj()const
85 	{
86 		fprintf(mFile,"\"%s.rpo\"",mName.c_str());
87 	}
getRefPointObjX()88 	void getRefPointObjX()const
89 	{
90 		fprintf(mFile,"\"%s.rpo.rpox\"",mName.c_str());
91 	}
getRefPointObjY()92 	void getRefPointObjY()const
93 	{
94 		fprintf(mFile,"\"%s.rpo.rpoy\"",mName.c_str());
95 	}
getRefPointObjZ()96 	void getRefPointObjZ()const
97 	{
98 		fprintf(mFile,"\"%s.rpo.rpoz\"",mName.c_str());
99 	}
getRefPointCamera()100 	void getRefPointCamera()const
101 	{
102 		fprintf(mFile,"\"%s.rpc\"",mName.c_str());
103 	}
getRefPointCameraX()104 	void getRefPointCameraX()const
105 	{
106 		fprintf(mFile,"\"%s.rpc.rcx\"",mName.c_str());
107 	}
getRefPointCameraY()108 	void getRefPointCameraY()const
109 	{
110 		fprintf(mFile,"\"%s.rpc.rcy\"",mName.c_str());
111 	}
getRefPointCameraZ()112 	void getRefPointCameraZ()const
113 	{
114 		fprintf(mFile,"\"%s.rpc.rcz\"",mName.c_str());
115 	}
getRayOrigin()116 	void getRayOrigin()const
117 	{
118 		fprintf(mFile,"\"%s.ro\"",mName.c_str());
119 	}
getRayOriginX()120 	void getRayOriginX()const
121 	{
122 		fprintf(mFile,"\"%s.ro.rox\"",mName.c_str());
123 	}
getRayOriginY()124 	void getRayOriginY()const
125 	{
126 		fprintf(mFile,"\"%s.ro.roy\"",mName.c_str());
127 	}
getRayOriginZ()128 	void getRayOriginZ()const
129 	{
130 		fprintf(mFile,"\"%s.ro.roz\"",mName.c_str());
131 	}
getXPixelAngle()132 	void getXPixelAngle()const
133 	{
134 		fprintf(mFile,"\"%s.xpa\"",mName.c_str());
135 	}
getInfoBits()136 	void getInfoBits()const
137 	{
138 		fprintf(mFile,"\"%s.ib\"",mName.c_str());
139 	}
getNormalCamera()140 	void getNormalCamera()const
141 	{
142 		fprintf(mFile,"\"%s.n\"",mName.c_str());
143 	}
getNormalCameraX()144 	void getNormalCameraX()const
145 	{
146 		fprintf(mFile,"\"%s.n.nx\"",mName.c_str());
147 	}
getNormalCameraY()148 	void getNormalCameraY()const
149 	{
150 		fprintf(mFile,"\"%s.n.ny\"",mName.c_str());
151 	}
getNormalCameraZ()152 	void getNormalCameraZ()const
153 	{
154 		fprintf(mFile,"\"%s.n.nz\"",mName.c_str());
155 	}
getTangentUCamera()156 	void getTangentUCamera()const
157 	{
158 		fprintf(mFile,"\"%s.tu\"",mName.c_str());
159 	}
getTangentUx()160 	void getTangentUx()const
161 	{
162 		fprintf(mFile,"\"%s.tu.tux\"",mName.c_str());
163 	}
getTangentUy()164 	void getTangentUy()const
165 	{
166 		fprintf(mFile,"\"%s.tu.tuy\"",mName.c_str());
167 	}
getTangentUz()168 	void getTangentUz()const
169 	{
170 		fprintf(mFile,"\"%s.tu.tuz\"",mName.c_str());
171 	}
getTangentVCamera()172 	void getTangentVCamera()const
173 	{
174 		fprintf(mFile,"\"%s.tv\"",mName.c_str());
175 	}
getTangentVx()176 	void getTangentVx()const
177 	{
178 		fprintf(mFile,"\"%s.tv.tvx\"",mName.c_str());
179 	}
getTangentVy()180 	void getTangentVy()const
181 	{
182 		fprintf(mFile,"\"%s.tv.tvy\"",mName.c_str());
183 	}
getTangentVz()184 	void getTangentVz()const
185 	{
186 		fprintf(mFile,"\"%s.tv.tvz\"",mName.c_str());
187 	}
getBumpDepth()188 	void getBumpDepth()const
189 	{
190 		fprintf(mFile,"\"%s.bd\"",mName.c_str());
191 	}
getBumpFilter()192 	void getBumpFilter()const
193 	{
194 		fprintf(mFile,"\"%s.bf\"",mName.c_str());
195 	}
getBumpFilterOffset()196 	void getBumpFilterOffset()const
197 	{
198 		fprintf(mFile,"\"%s.bfo\"",mName.c_str());
199 	}
getBumpValue()200 	void getBumpValue()const
201 	{
202 		fprintf(mFile,"\"%s.bv\"",mName.c_str());
203 	}
getOutNormal()204 	void getOutNormal()const
205 	{
206 		fprintf(mFile,"\"%s.o\"",mName.c_str());
207 	}
getOutNormalX()208 	void getOutNormalX()const
209 	{
210 		fprintf(mFile,"\"%s.o.ox\"",mName.c_str());
211 	}
getOutNormalY()212 	void getOutNormalY()const
213 	{
214 		fprintf(mFile,"\"%s.o.oy\"",mName.c_str());
215 	}
getOutNormalZ()216 	void getOutNormalZ()const
217 	{
218 		fprintf(mFile,"\"%s.o.oz\"",mName.c_str());
219 	}
220 protected:
221 	Bump3d(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
DependNode(file,name,parent,nodeType,shared,create)222 		:DependNode(file, name, parent, nodeType, shared, create) {}
223 
224 };
225 }//namespace MayaDM
226 #endif//__MayaDM_BUMP3D_H__
227