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

« back to all changes in this revision

Viewing changes to Externals/MayaDataModel/include/MayaDMMultilisterLight.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_MULTILISTERLIGHT_H__
 
11
#define __MayaDM_MULTILISTERLIGHT_H__
 
12
#include "MayaDMTypes.h"
 
13
#include "MayaDMConnectables.h"
 
14
#include "MayaDMDependNode.h"
 
15
namespace MayaDM
 
16
{
 
17
class MultilisterLight : public DependNode
 
18
{
 
19
public:
 
20
public:
 
21
 
 
22
        MultilisterLight():DependNode(){}
 
23
        MultilisterLight(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
 
24
                :DependNode(file, name, parent, "multilisterLight", shared, create){}
 
25
        virtual ~MultilisterLight(){}
 
26
 
 
27
        void setPointCamera(const float3& p)
 
28
        {
 
29
                if(p == float3(1.0f,1.0f,1.0f)) return;
 
30
                fprintf(mFile,"\tsetAttr \".p\" -type \"float3\" ");
 
31
                p.write(mFile);
 
32
                fprintf(mFile,";\n");
 
33
        }
 
34
        void setPointCameraX(float px)
 
35
        {
 
36
                if(px == 0.0) return;
 
37
                fprintf(mFile,"\tsetAttr \".p.px\" %f;\n", px);
 
38
        }
 
39
        void setPointCameraY(float py)
 
40
        {
 
41
                if(py == 0.0) return;
 
42
                fprintf(mFile,"\tsetAttr \".p.py\" %f;\n", py);
 
43
        }
 
44
        void setPointCameraZ(float pz)
 
45
        {
 
46
                if(pz == 0.0) return;
 
47
                fprintf(mFile,"\tsetAttr \".p.pz\" %f;\n", pz);
 
48
        }
 
49
        void getPointCamera()const
 
50
        {
 
51
                fprintf(mFile,"\"%s.p\"",mName.c_str());
 
52
        }
 
53
        void getPointCameraX()const
 
54
        {
 
55
                fprintf(mFile,"\"%s.p.px\"",mName.c_str());
 
56
        }
 
57
        void getPointCameraY()const
 
58
        {
 
59
                fprintf(mFile,"\"%s.p.py\"",mName.c_str());
 
60
        }
 
61
        void getPointCameraZ()const
 
62
        {
 
63
                fprintf(mFile,"\"%s.p.pz\"",mName.c_str());
 
64
        }
 
65
        void getLightData()const
 
66
        {
 
67
                fprintf(mFile,"\"%s.ltd\"",mName.c_str());
 
68
        }
 
69
        void getLightDirection()const
 
70
        {
 
71
                fprintf(mFile,"\"%s.ltd.ld\"",mName.c_str());
 
72
        }
 
73
        void getLightDirectionX()const
 
74
        {
 
75
                fprintf(mFile,"\"%s.ltd.ld.ldx\"",mName.c_str());
 
76
        }
 
77
        void getLightDirectionY()const
 
78
        {
 
79
                fprintf(mFile,"\"%s.ltd.ld.ldy\"",mName.c_str());
 
80
        }
 
81
        void getLightDirectionZ()const
 
82
        {
 
83
                fprintf(mFile,"\"%s.ltd.ld.ldz\"",mName.c_str());
 
84
        }
 
85
        void getLightIntensity()const
 
86
        {
 
87
                fprintf(mFile,"\"%s.ltd.li\"",mName.c_str());
 
88
        }
 
89
        void getLightIntensityR()const
 
90
        {
 
91
                fprintf(mFile,"\"%s.ltd.li.lir\"",mName.c_str());
 
92
        }
 
93
        void getLightIntensityG()const
 
94
        {
 
95
                fprintf(mFile,"\"%s.ltd.li.lig\"",mName.c_str());
 
96
        }
 
97
        void getLightIntensityB()const
 
98
        {
 
99
                fprintf(mFile,"\"%s.ltd.li.lib\"",mName.c_str());
 
100
        }
 
101
        void getLightAmbient()const
 
102
        {
 
103
                fprintf(mFile,"\"%s.ltd.la\"",mName.c_str());
 
104
        }
 
105
        void getLightDiffuse()const
 
106
        {
 
107
                fprintf(mFile,"\"%s.ltd.ldf\"",mName.c_str());
 
108
        }
 
109
        void getLightSpecular()const
 
110
        {
 
111
                fprintf(mFile,"\"%s.ltd.ls\"",mName.c_str());
 
112
        }
 
113
        void getLightShadowFraction()const
 
114
        {
 
115
                fprintf(mFile,"\"%s.ltd.lsf\"",mName.c_str());
 
116
        }
 
117
        void getPreShadowIntensity()const
 
118
        {
 
119
                fprintf(mFile,"\"%s.ltd.psi\"",mName.c_str());
 
120
        }
 
121
        void getLightBlindData()const
 
122
        {
 
123
                fprintf(mFile,"\"%s.ltd.lbd\"",mName.c_str());
 
124
        }
 
125
protected:
 
126
        MultilisterLight(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
 
127
                :DependNode(file, name, parent, nodeType, shared, create) {}
 
128
 
 
129
};
 
130
}//namespace MayaDM
 
131
#endif//__MayaDM_MULTILISTERLIGHT_H__