Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / effects / inc / FUiEffects_RuntimeDirectionalLight.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 /**
18  * @file        FUiEffects_RuntimeDirectionalLight.h
19  * @brief               This is the header file for a directional light
20  */
21
22 #ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_DIRECTIONAL_LIGHT_H_
23 #define _FUI_EFFECTS_INTERNAL_RUNTIME_DIRECTIONAL_LIGHT_H_
24
25 #include <string>
26 #include <utils/FUiEffects_Utils.h>
27 #include "FUiEffects_RuntimeUnitLight.h"
28
29 namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime
30 {
31
32 //tolua_begin                   <--(!do not edit!)the beginning of export part to lua
33 class DirectionalLight
34         : public UnitLight
35 {
36 //tolua_end                             <--(!do not edit!)the ending of export part to lua
37 public:
38
39         /**
40          * Returns a pointer to created directional light
41          *
42          * @since 2.0
43          *
44          */
45         static DirectionalLight* CreateDirectionalLight(const std::string& name);
46 #if 0
47         static DirectionalLight* CreateDirectionalLight(const string& name);            //tolua_export          <--(!do not edit!)the exporting line to lua
48 #endif
49
50         /**
51          * Returns a pointer to created directional light
52          *
53          * @since 2.0
54          *
55          */
56         static DirectionalLight* CreateDirectionalLight(bool enabled,
57                                                                                                         const std::string& name,
58                                                                                                         const Tizen::Ui::Effects::_Utils::Vec3f& colour,
59                                                                                                         float intensity,
60                                                                                                         const Tizen::Ui::Effects::_Utils::Vec3f& direction
61                                                                                                         );
62
63         /**
64          * Returns a direction of a directional light
65          *
66          * @since 2.0
67          *
68          */
69         const Tizen::Ui::Effects::_Utils::Vec3f& GetDirection(void) const;
70 #if 0
71         const Vector3& GetDirection(void) const;                                                                        //tolua_export          <--(!do not edit!)the exporting line to lua
72 #endif
73
74         /**
75          * Sets a direction of a directional light
76          *
77          * @since 2.0
78          *
79          */
80         void SetDirection(const Tizen::Ui::Effects::_Utils::Vec3f& direction);
81 #if 0
82         void SetDirection(const Vector3& direction);                                                            //tolua_export          <--(!do not edit!)the exporting line to lua
83 #endif
84
85         /**
86          * Sets a direction of a directional light
87          *
88          * @since 2.0
89          *
90          */
91         void SetDirection(float x, float y, float z);                                                           //tolua_export          <--(!do not edit!)the exporting line to lua
92
93         /**
94          * Returns a type of a directional light as variable of enumeration type
95          *
96          * @since 2.0
97          *
98          */
99         virtual TypeUnitLight GetType(void) const;
100
101         /**
102          * Resets all signs for this instance of class (e.g. isDirectionChanged, isColourChanged)
103          *
104          * @since 2.0
105          *
106          */
107         virtual void ResetSigns(void);
108
109 protected:
110
111         /**
112          * Class constructor
113          *
114          * @since 2.0
115          *
116          * @remarks             Clients of this class can create DirectionalLight objects with using Create methods only
117          *
118          */
119         DirectionalLight(const std::string& name);
120
121         /**
122          * Class constructor
123          *
124          * @since 2.0
125          *
126          * @remarks             Clients of this class can create DirectionalLight objects with using Create methods only
127          *
128          */
129         DirectionalLight(bool isEnabled,
130                                         const std::string& name,
131                                         const Tizen::Ui::Effects::_Utils::Vec3f& colour,
132                                         float intensity,
133                                         const Tizen::Ui::Effects::_Utils::Vec3f& direction
134                                         );
135
136         /**
137          * Class destructor
138          *
139          * @since 2.0
140          *
141          * @remarks             Clients of this class can not destroy instances of this class (for purpose to avoid the sending an invalid unit light into scene)
142          *
143          */
144         ~DirectionalLight(void);
145
146 private:
147
148         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
149         DirectionalLight(const DirectionalLight& rhs);
150         // The implementation of this assignment operator is intentionally blank and declared as private to prohibit copying of objects.
151         DirectionalLight& operator=(const DirectionalLight& rhs);
152
153 public:
154
155         bool isDirectionChanged;
156
157 private:
158
159         Tizen::Ui::Effects::_Utils::Vec3f __direction;  /**< a direction for a directional light*/
160
161 }; //DirectionalLight   //tolua_export          <--(!do not edit!)the exporting line to lua
162
163 } } } } // Tizen::Ui::Effects::_Runtime
164
165 #endif  //_FUI_EFFECTS_INTERNAL_RUNTIME_DIRECTIONAL_LIGHT_H_