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_GAMMACORRECT_H__
11
#define __MayaDM_GAMMACORRECT_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMDependNode.h"
17
class GammaCorrect : public DependNode
22
GammaCorrect():DependNode(){}
23
GammaCorrect(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:DependNode(file, name, parent, "gammaCorrect", shared, create){}
25
virtual ~GammaCorrect(){}
27
void setValue(const float3& v)
29
if(v == float3(0.0f,0.0f,0.0f)) return;
30
fprintf(mFile,"\tsetAttr \".v\" -type \"float3\" ");
34
void setValueX(float vx)
37
fprintf(mFile,"\tsetAttr \".v.vx\" %f;\n", vx);
39
void setValueY(float vy)
42
fprintf(mFile,"\tsetAttr \".v.vy\" %f;\n", vy);
44
void setValueZ(float vz)
47
fprintf(mFile,"\tsetAttr \".v.vz\" %f;\n", vz);
49
void setGamma(const float3& g)
51
if(g == float3(1.0f,1.0f,1.0f)) return;
52
fprintf(mFile,"\tsetAttr \".g\" -type \"float3\" ");
56
void setGammaX(float gx)
59
fprintf(mFile,"\tsetAttr \".g.gx\" %f;\n", gx);
61
void setGammaY(float gy)
64
fprintf(mFile,"\tsetAttr \".g.gy\" %f;\n", gy);
66
void setGammaZ(float gz)
69
fprintf(mFile,"\tsetAttr \".g.gz\" %f;\n", gz);
73
fprintf(mFile,"\"%s.v\"",mName.c_str());
77
fprintf(mFile,"\"%s.v.vx\"",mName.c_str());
81
fprintf(mFile,"\"%s.v.vy\"",mName.c_str());
85
fprintf(mFile,"\"%s.v.vz\"",mName.c_str());
89
fprintf(mFile,"\"%s.g\"",mName.c_str());
93
fprintf(mFile,"\"%s.g.gx\"",mName.c_str());
97
fprintf(mFile,"\"%s.g.gy\"",mName.c_str());
101
fprintf(mFile,"\"%s.g.gz\"",mName.c_str());
103
void getOutValue()const
105
fprintf(mFile,"\"%s.o\"",mName.c_str());
107
void getOutValueX()const
109
fprintf(mFile,"\"%s.o.ox\"",mName.c_str());
111
void getOutValueY()const
113
fprintf(mFile,"\"%s.o.oy\"",mName.c_str());
115
void getOutValueZ()const
117
fprintf(mFile,"\"%s.o.oz\"",mName.c_str());
120
GammaCorrect(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
121
:DependNode(file, name, parent, nodeType, shared, create) {}
125
#endif//__MayaDM_GAMMACORRECT_H__