~ubuntu-branches/ubuntu/wily/opencollada/wily-proposed

« back to all changes in this revision

Viewing changes to Externals/MayaDataModel/include/MayaDMHwReflectionMap.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2015-05-14 17:23:27 UTC
  • Revision ID: package-import@ubuntu.com-20150514172327-f862u8envms01fra
Tags: upstream-0.1.0~20140703.ddf8f47+dfsg1
ImportĀ upstreamĀ versionĀ 0.1.0~20140703.ddf8f47+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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_HWREFLECTIONMAP_H__
 
11
#define __MayaDM_HWREFLECTIONMAP_H__
 
12
#include "MayaDMTypes.h"
 
13
#include "MayaDMConnectables.h"
 
14
#include "MayaDMDependNode.h"
 
15
namespace MayaDM
 
16
{
 
17
class HwReflectionMap : public DependNode
 
18
{
 
19
public:
 
20
public:
 
21
 
 
22
        HwReflectionMap():DependNode(){}
 
23
        HwReflectionMap(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
 
24
                :DependNode(file, name, parent, "hwReflectionMap", shared, create){}
 
25
        virtual ~HwReflectionMap(){}
 
26
 
 
27
        void setDecalMode(bool dm)
 
28
        {
 
29
                if(dm == true) return;
 
30
                fprintf(mFile,"\tsetAttr \".dm\" %i;\n", dm);
 
31
        }
 
32
        void setCubeMap(bool cm)
 
33
        {
 
34
                if(cm == false) return;
 
35
                fprintf(mFile,"\tsetAttr \".cm\" %i;\n", cm);
 
36
        }
 
37
        void setTextureHasChanged(bool thc)
 
38
        {
 
39
                if(thc == false) return;
 
40
                fprintf(mFile,"\tsetAttr \".thc\" %i;\n", thc);
 
41
        }
 
42
        void setSphereMapTextureName(const string& smtn)
 
43
        {
 
44
                if(smtn == "NULL") return;
 
45
                fprintf(mFile,"\tsetAttr \".smtn\" -type \"string\" ");
 
46
                smtn.write(mFile);
 
47
                fprintf(mFile,";\n");
 
48
        }
 
49
        void setCubeFrontTextureName(const string& cftn)
 
50
        {
 
51
                if(cftn == "NULL") return;
 
52
                fprintf(mFile,"\tsetAttr \".cftn\" -type \"string\" ");
 
53
                cftn.write(mFile);
 
54
                fprintf(mFile,";\n");
 
55
        }
 
56
        void setCubeBackTextureName(const string& cbkn)
 
57
        {
 
58
                if(cbkn == "NULL") return;
 
59
                fprintf(mFile,"\tsetAttr \".cbkn\" -type \"string\" ");
 
60
                cbkn.write(mFile);
 
61
                fprintf(mFile,";\n");
 
62
        }
 
63
        void setCubeTopTextureName(const string& ctpn)
 
64
        {
 
65
                if(ctpn == "NULL") return;
 
66
                fprintf(mFile,"\tsetAttr \".ctpn\" -type \"string\" ");
 
67
                ctpn.write(mFile);
 
68
                fprintf(mFile,";\n");
 
69
        }
 
70
        void setCubeBottomTextureName(const string& cbmn)
 
71
        {
 
72
                if(cbmn == "NULL") return;
 
73
                fprintf(mFile,"\tsetAttr \".cbmn\" -type \"string\" ");
 
74
                cbmn.write(mFile);
 
75
                fprintf(mFile,";\n");
 
76
        }
 
77
        void setCubeLeftTextureName(const string& cltn)
 
78
        {
 
79
                if(cltn == "NULL") return;
 
80
                fprintf(mFile,"\tsetAttr \".cltn\" -type \"string\" ");
 
81
                cltn.write(mFile);
 
82
                fprintf(mFile,";\n");
 
83
        }
 
84
        void setCubeRightTextureName(const string& crtn)
 
85
        {
 
86
                if(crtn == "NULL") return;
 
87
                fprintf(mFile,"\tsetAttr \".crtn\" -type \"string\" ");
 
88
                crtn.write(mFile);
 
89
                fprintf(mFile,";\n");
 
90
        }
 
91
        void getDecalMode()const
 
92
        {
 
93
                fprintf(mFile,"\"%s.dm\"",mName.c_str());
 
94
        }
 
95
        void getCubeMap()const
 
96
        {
 
97
                fprintf(mFile,"\"%s.cm\"",mName.c_str());
 
98
        }
 
99
        void getTextureHasChanged()const
 
100
        {
 
101
                fprintf(mFile,"\"%s.thc\"",mName.c_str());
 
102
        }
 
103
        void getSphereMapTextureName()const
 
104
        {
 
105
                fprintf(mFile,"\"%s.smtn\"",mName.c_str());
 
106
        }
 
107
        void getCubeFrontTextureName()const
 
108
        {
 
109
                fprintf(mFile,"\"%s.cftn\"",mName.c_str());
 
110
        }
 
111
        void getCubeBackTextureName()const
 
112
        {
 
113
                fprintf(mFile,"\"%s.cbkn\"",mName.c_str());
 
114
        }
 
115
        void getCubeTopTextureName()const
 
116
        {
 
117
                fprintf(mFile,"\"%s.ctpn\"",mName.c_str());
 
118
        }
 
119
        void getCubeBottomTextureName()const
 
120
        {
 
121
                fprintf(mFile,"\"%s.cbmn\"",mName.c_str());
 
122
        }
 
123
        void getCubeLeftTextureName()const
 
124
        {
 
125
                fprintf(mFile,"\"%s.cltn\"",mName.c_str());
 
126
        }
 
127
        void getCubeRightTextureName()const
 
128
        {
 
129
                fprintf(mFile,"\"%s.crtn\"",mName.c_str());
 
130
        }
 
131
protected:
 
132
        HwReflectionMap(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
 
133
                :DependNode(file, name, parent, nodeType, shared, create) {}
 
134
 
 
135
};
 
136
}//namespace MayaDM
 
137
#endif//__MayaDM_HWREFLECTIONMAP_H__