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_ROCK_H__
11
#define __MayaDM_ROCK_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMTexture3d.h"
17
class Rock : public Texture3d
23
Rock(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:Texture3d(file, name, parent, "rock", shared, create){}
27
void setColor1(const float3& c1)
29
if(c1 == float3(0.235f,0.0f,0.0f)) return;
30
fprintf(mFile,"\tsetAttr \".c1\" -type \"float3\" ");
34
void setColor1R(float c1r)
36
if(c1r == 0.0) return;
37
fprintf(mFile,"\tsetAttr \".c1.c1r\" %f;\n", c1r);
39
void setColor1G(float c1g)
41
if(c1g == 0.0) return;
42
fprintf(mFile,"\tsetAttr \".c1.c1g\" %f;\n", c1g);
44
void setColor1B(float c1b)
46
if(c1b == 0.0) return;
47
fprintf(mFile,"\tsetAttr \".c1.c1b\" %f;\n", c1b);
49
void setColor2(const float3& c2)
51
if(c2 == float3(1.0f,1.0f,1.0f)) return;
52
fprintf(mFile,"\tsetAttr \".c2\" -type \"float3\" ");
56
void setColor2R(float c2r)
58
if(c2r == 0.0) return;
59
fprintf(mFile,"\tsetAttr \".c2.c2r\" %f;\n", c2r);
61
void setColor2G(float c2g)
63
if(c2g == 0.0) return;
64
fprintf(mFile,"\tsetAttr \".c2.c2g\" %f;\n", c2g);
66
void setColor2B(float c2b)
68
if(c2b == 0.0) return;
69
fprintf(mFile,"\tsetAttr \".c2.c2b\" %f;\n", c2b);
71
void setGrainSize(float gs)
73
if(gs == 0.01) return;
74
fprintf(mFile,"\tsetAttr \".gs\" %f;\n", gs);
76
void setDiffusion(float di)
79
fprintf(mFile,"\tsetAttr \".di\" %f;\n", di);
81
void setMixRatio(float mr)
84
fprintf(mFile,"\tsetAttr \".mr\" %f;\n", mr);
86
void getRefPointObj()const
88
fprintf(mFile,"\"%s.rpo\"",mName.c_str());
90
void getRefPointObjX()const
92
fprintf(mFile,"\"%s.rpo.rox\"",mName.c_str());
94
void getRefPointObjY()const
96
fprintf(mFile,"\"%s.rpo.roy\"",mName.c_str());
98
void getRefPointObjZ()const
100
fprintf(mFile,"\"%s.rpo.roz\"",mName.c_str());
102
void getRefPointCamera()const
104
fprintf(mFile,"\"%s.rpc\"",mName.c_str());
106
void getRefPointCameraX()const
108
fprintf(mFile,"\"%s.rpc.rcx\"",mName.c_str());
110
void getRefPointCameraY()const
112
fprintf(mFile,"\"%s.rpc.rcy\"",mName.c_str());
114
void getRefPointCameraZ()const
116
fprintf(mFile,"\"%s.rpc.rcz\"",mName.c_str());
118
void getColor1()const
120
fprintf(mFile,"\"%s.c1\"",mName.c_str());
122
void getColor1R()const
124
fprintf(mFile,"\"%s.c1.c1r\"",mName.c_str());
126
void getColor1G()const
128
fprintf(mFile,"\"%s.c1.c1g\"",mName.c_str());
130
void getColor1B()const
132
fprintf(mFile,"\"%s.c1.c1b\"",mName.c_str());
134
void getColor2()const
136
fprintf(mFile,"\"%s.c2\"",mName.c_str());
138
void getColor2R()const
140
fprintf(mFile,"\"%s.c2.c2r\"",mName.c_str());
142
void getColor2G()const
144
fprintf(mFile,"\"%s.c2.c2g\"",mName.c_str());
146
void getColor2B()const
148
fprintf(mFile,"\"%s.c2.c2b\"",mName.c_str());
150
void getGrainSize()const
152
fprintf(mFile,"\"%s.gs\"",mName.c_str());
154
void getDiffusion()const
156
fprintf(mFile,"\"%s.di\"",mName.c_str());
158
void getMixRatio()const
160
fprintf(mFile,"\"%s.mr\"",mName.c_str());
163
Rock(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
164
:Texture3d(file, name, parent, nodeType, shared, create) {}
168
#endif//__MayaDM_ROCK_H__