2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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.
18 * @file FUiEffects_RuntimeSpotLight.h
19 * @brief This is the header file for a spot light
22 #ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_SPOT_LIGHT_H_
23 #define _FUI_EFFECTS_INTERNAL_RUNTIME_SPOT_LIGHT_H_
26 #include <utils/FUiEffects_Utils.h>
27 #include <FUiEffects_RuntimePointLight.h>
29 namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime
32 //tolua_begin <--(!do not edit!)the beginning of export part to lua
36 //tolua_end <--(!do not edit!)the ending of export part to lua
40 * Returns a pointer to created spot light
45 static SpotLight* CreateSpotLight(const std::string& name);
47 static SpotLight* CreateSpotLight(const string& name); //tolua_export <--(!do not edit!)the exporting line to lua
51 * Returns a pointer to created spot light
56 static SpotLight* CreateSpotLight(bool enabled,
57 const std::string& name,
58 const Tizen::Ui::Effects::_Utils::Vec3f& colour,
60 const Tizen::Ui::Effects::_Utils::Vec3f& position,
61 const Tizen::Ui::Effects::_Utils::Vec3f& target,
67 * Returns a target point of a spot (Where does spot shine?)
72 const Tizen::Ui::Effects::_Utils::Vec3f& GetTarget(void) const;
74 const Vector3& GetTarget(void) const; //tolua_export <--(!do not edit!)the exporting line to lua
78 * Returns an opening angle of spot (an angle between opposite forming lines of a spot cone)
83 float GetAngleOpening(void) const; //tolua_export <--(!do not edit!)the exporting line to lua
86 * Returns an angle of fade out for spot
87 * (an angle between some forming line of a spot cone and a some ray from a position of spot which not lies in spot cone)
91 * @remarks This angle determines how spot light attenuates with angle growing if angle is great than angle opening
94 float GetAngleFadeOut(void) const; //tolua_export <--(!do not edit!)the exporting line to lua
97 * Sets a target point for a spot
102 void SetTarget(const Tizen::Ui::Effects::_Utils::Vec3f& target);
104 void SetTarget(const Vector3& target); //tolua_export <--(!do not edit!)the exporting line to lua
108 * Sets target point for spot
113 void SetTarget(float x, float y, float z); //tolua_export <--(!do not edit!)the exporting line to lua
116 * Sets an angle opening for a spot
121 bool SetAngleOpening(float angleOpening); //tolua_export <--(!do not edit!)the exporting line to lua
124 * Sets an angle of fade out for a spot
129 bool SetAngleFadeOut(float angleFadeOut); //tolua_export <--(!do not edit!)the exporting line to lua
132 * Returns a type of a spot light as variable of enumeration type
137 virtual TypeUnitLight GetType(void) const;
140 * Resets all signs for this instance of class (e.g. isTargetChanged, isColourChanged)
145 virtual void ResetSigns(void);
154 * @remarks Clients of this class can create SpotLight objects with using Create methods only
157 SpotLight(const std::string& name);
164 * @remarks Clients of this class can create SpotLight objects with using Create methods only
167 SpotLight(bool enabled,
168 const std::string& name,
169 const Tizen::Ui::Effects::_Utils::Vec3f& colour,
171 const Tizen::Ui::Effects::_Utils::Vec3f& position,
172 const Tizen::Ui::Effects::_Utils::Vec3f& target,
182 * @remarks Clients of this class can not destroy instances of this class (for purpose to avoid the sending an invalid unit light into scene)
185 virtual ~SpotLight(void);
189 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
190 SpotLight(const SpotLight& rhs);
191 // The implementation of this assignment operator is intentionally blank and declared as private to prohibit copying of objects.
192 SpotLight& operator=(const SpotLight& rhs);
196 bool isTargetChanged;
197 bool isAngleOpeningChanged;
198 bool isAngleFadeOutChanged;
202 Tizen::Ui::Effects::_Utils::Vec3f __target; /**< a target point for a spot (Where does spot shine?) */
203 float __angleOpening; /**< an angle opening for a spot */
204 float __angleFadeOut; /**< an angle of fade out for a spot */
205 }; //SpotLight //tolua_export <--(!do not edit!)the exporting line to lua
207 } } } } // Tizen::Ui::Effects::_Runtime
209 #endif //_FUI_EFFECTS_INTERNAL_RUNTIME_SPOT_LIGHT_H_