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_PARTICLETRANSPMAPPER_H__
11
#define __MayaDM_PARTICLETRANSPMAPPER_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMDependNode.h"
17
class ParticleTranspMapper : public DependNode
22
ParticleTranspMapper():DependNode(){}
23
ParticleTranspMapper(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:DependNode(file, name, parent, "particleTranspMapper", shared, create){}
25
virtual ~ParticleTranspMapper(){}
27
void setParticleTransparency(const float3& pt)
29
fprintf(mFile,"\tsetAttr \".pt\" -type \"float3\" ");
33
void setParticleTransparencyR(float ptr)
35
if(ptr == 0.0) return;
36
fprintf(mFile,"\tsetAttr \".pt.ptr\" %f;\n", ptr);
38
void setParticleTransparencyG(float ptg)
40
if(ptg == 0.0) return;
41
fprintf(mFile,"\tsetAttr \".pt.ptg\" %f;\n", ptg);
43
void setParticleTransparencyB(float ptb)
45
if(ptb == 0.0) return;
46
fprintf(mFile,"\tsetAttr \".pt.ptb\" %f;\n", ptb);
48
void getParticleTransparency()const
50
fprintf(mFile,"\"%s.pt\"",mName.c_str());
52
void getParticleTransparencyR()const
54
fprintf(mFile,"\"%s.pt.ptr\"",mName.c_str());
56
void getParticleTransparencyG()const
58
fprintf(mFile,"\"%s.pt.ptg\"",mName.c_str());
60
void getParticleTransparencyB()const
62
fprintf(mFile,"\"%s.pt.ptb\"",mName.c_str());
65
ParticleTranspMapper(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
66
:DependNode(file, name, parent, nodeType, shared, create) {}
70
#endif//__MayaDM_PARTICLETRANSPMAPPER_H__