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_RuntimeIEffectModelScript.h
19 * @brief This is the header file for the IEffectModelScript class.
22 #ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_IEFFECT_MODEL_SCRIPT_H_
23 #define _FUI_EFFECTS_INTERNAL_RUNTIME_IEFFECT_MODEL_SCRIPT_H_
25 #include "utils/FUiEffects_Utils.h"
27 namespace _Utils { template<class T> class LuaMat4; }
29 namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime
35 * @class IEffectModelScript
36 * @brief This class is an interface between ScriptProcessing and EffectModel –
37 * API for EffectModel access from user's scripts
42 class IEffectModelScript
52 virtual ~IEffectModelScript(void)
57 * Called by ScriptProcessing to modify the element's property of boolean type
62 virtual bool ScriptSetProperty(long objID, ElementProperty property, bool value) = 0;
65 * Called by ScriptProcessing to modify the element's property of lua_Number type
66 * (floating point or integer)
71 virtual bool ScriptSetProperty(long objID, ElementProperty property, LUA_NUMBER value) = 0;
74 * Called by ScriptProcessing to modify the element's property of Vec3f type
79 virtual bool ScriptSetProperty(long objID, ElementProperty property, const Tizen::Ui::Effects::_Utils::Vec3f &value) = 0;
82 * Called by ScriptProcessing to modify some group of elements
83 * for specified model surface
88 virtual bool ScriptSetPropertyGroup(long modelSurfaceID, GroupElements group, ElementProperty property, LUA_NUMBER value) = 0;
91 * Called by ScriptProcessing to get distance from ground for model surface
96 virtual PropertyCast ScriptGetDistanceFromGround(long modelSurfaceID) const = 0;
99 * Called by ScriptProcessing to get the element's property of any type,
100 * specified in class PropertyCast
105 virtual PropertyCast ScriptGetProperty(long objID, ElementProperty property) const = 0;
108 * Called by ScriptProcessing to modify bitmap resource
113 virtual bool ScriptUpdateBitmap(long graphicalSurfaceID, long bitmapID) = 0;
116 * Called by ScriptProcessing to get the IDs of vector of vectors of nearest points for specified GraphicalSurface
121 virtual PropertyCast ScriptGetNearestPointsIds(long graphicalSurfaceID, Tizen::Ui::Effects::_Utils::Vec3f &position) const = 0;
124 * Called by ScriptProcessing to modify model matrix (rotation)
129 virtual bool ScriptRotateSurface(long graphicalSurfaceID, float angle, _Axis axis, _Point point,
130 float ax, float ay, float az, float x0, float y0, float z0) = 0;
133 * Called by ScriptProcessing to modify model matrix (scaling)
138 virtual bool ScriptScaleSurface(long graphicalSurfaceID, float ax, float ay, float az, _Point point,
139 float x0, float y0, float z0) = 0;
142 * Called by ScriptProcessing to modify model matrix (translating)
147 virtual bool ScriptMoveSurface(long graphicalSurfaceID, float x0, float y0, float z0) = 0;
150 * Called by ScriptProcessing to modify model matrix (sets identity matrix)
155 virtual bool ScriptResetSurfaceTransformation(long graphicalSurfaceID) = 0;
158 * Called by ScriptProcessing to modify model matrix
163 virtual bool ScriptSetTransformationMatrix(long graphicalSurfaceID, const Tizen::Ui::Effects::_Utils::LuaMatrix4& luaMatrix4) = 0;
166 * Adds new unit light to scene
170 * @remarks Returns true if addition was succeeded and false otherwise
172 virtual bool ScriptAddUnitLight(UnitLight& unitLight) = 0;
175 * Excludes specified unit light from scene with using unique name of it
179 * @remarks Returns true if addition was succeeded and false otherwise
181 virtual bool ScriptRemoveUnitLight(const std::string& name) = 0;
184 * Excludes all units light of specified type from scene
188 * @remarks Returns true if addition was succeeded and false otherwise
190 virtual bool ScriptRemoveAllUnitsLightType(TypeUnitLight typeUnitLight) = 0;
193 * Returns specified unit light with using unique name of it
198 virtual PropertyCast ScriptGetUnitLight(const std::string& name) const = 0;
201 * Sets ambient colour for scene
206 virtual void ScriptSetLightAmbientColour(const Tizen::Ui::Effects::_Utils::Vec3f& ambientColour) = 0;
209 * Sets ambient colour for scene
214 virtual void ScriptSetLightAmbientColour(float red, float green, float blue) = 0;
217 * Sets light intensity for scene
222 virtual void ScriptSetLightIntensity(float intensity) = 0;
225 * Sets attenuation for units light on scene
230 virtual void ScriptSetLightAttenuation(float attenuation) = 0;
233 * Returns ambient colour of scene
238 virtual const Tizen::Ui::Effects::_Utils::Vec3f& ScriptGetLightAmbientColour(void) const = 0;
241 * Returns light intensity of scene
246 virtual float ScriptGetLightIntensity(void) const = 0;
249 * Returns attenuation for units light on scene
254 virtual float ScriptGetLightAttenuation(void) const = 0;
256 }; // IEffectModelScript
258 } } } } // Tizen::Ui::Effects::_Runtime
260 #endif //_FUI_EFFECTS_INTERNAL_RUNTIME_IEFFECT_MODEL_SCRIPT_H_