Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / effects / inc / FUiEffects_PeElementSurface.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_PeElementSurface.h
19 * @brief       This is the header file for the ElementSurface class
20 */
21
22 #ifndef _FUI_EFFECTS_INTERNAL_PE_ELEMENTSURFACE_H_
23 #define _FUI_EFFECTS_INTERNAL_PE_ELEMENTSURFACE_H_
24
25 #include <lua.hpp>
26 #include "FUiEffects_RuntimeModel.h"
27 #include "FUiEffects_RuntimePropertyCast.h"
28
29 namespace Tizen { namespace Ui { namespace Effects { namespace _PhysicsEngine
30 {
31
32 /**
33  * @class       ElementSurface
34  * @brief       Abstract class for all physics model elements
35  *
36  * @since 2.0
37  *
38  */
39 class ElementSurface
40 {
41 public:
42         /**
43          * Class constructor
44          *
45          * @since 2.0
46          *
47          * @param[in]   objId   physical element's id. Must be unique for all objects
48          *
49          */
50         ElementSurface(long objId);
51
52         /**
53          * Class destructor
54          *
55          * @since 2.0
56          *
57          */
58         virtual ~ElementSurface(void);
59
60         /**
61          * Sets object into the initial state
62          *
63          * @since 2.0
64          *
65          */
66         virtual void Initialize(void) = 0;
67
68         /**
69          * Performs calculation step with given delta time
70          *
71          * @since 2.0
72          *
73          * @param[in]   timeStep        simulation time step
74          *
75          */
76         virtual void Calculate(float timeStep) = 0;
77
78         /**
79          * Gets object's id
80          *
81          * @since 2.0
82          *
83          * @return              object's id
84          *
85          */
86         long GetId(void) const;
87
88         /**
89          * Gets object's type
90          *
91          * @since 2.0
92          *
93          * @return              enum value that corresponds to object's type
94          *
95          */
96         virtual Tizen::Ui::Effects::_Runtime::ESurface GetType(void) const = 0;
97
98         /**
99          * Gets element property value
100          *
101          * @since 2.0
102          *
103          * @return              struct that contains property type and value
104          * @param[in]   property        enum value for necessary property
105          *
106          */
107         virtual Tizen::Ui::Effects::_Runtime::PropertyCast GetProperty(
108                 Tizen::Ui::Effects::_Runtime::ElementProperty property
109         ) const;
110
111         /**
112          * Sets element bool property values
113          *
114          * @since 2.0
115          *
116          * @return              true if set successful, false if failed
117          * @param[in]   property        property name
118          * @param[in]   boolValue       new bool value for property
119          *
120          */
121         virtual bool SetProperty(
122                 Tizen::Ui::Effects::_Runtime::ElementProperty property,
123                 bool boolValue
124         );
125
126         /**
127          * Sets element numeric property values
128          *
129          * @since 2.0
130          *
131          * @return              true if set successful, false if failed
132          * @param[in]   property                property name
133          * @param[in]   numericValue    new numeric value for property
134          *
135          */
136         virtual bool SetProperty(
137                 Tizen::Ui::Effects::_Runtime::ElementProperty property,
138                 LUA_NUMBER numericValue
139         );
140
141         /**
142          * Sets element vector property values
143          *
144          * @since 2.0
145          *
146          * @return              true if set successful, false if failed
147          * @param[in]   property                property name
148          * @param[in]   vectorValue     new vector value for property
149          *
150          */
151         virtual bool SetProperty(
152                 Tizen::Ui::Effects::_Runtime::ElementProperty property,
153                 const Tizen::Ui::Effects::_Utils::Vec3f &vectorValue
154         );
155
156 protected:
157         /**
158          * Hidden copy constructor
159          *
160          * @since 2.0
161          *
162          */
163         ElementSurface(const ElementSurface &rhs) : __objId(0)
164         { }
165
166 private:
167         /**
168          * Hidden assignment operator
169          *
170          * @since 2.0
171          *
172          */
173         ElementSurface& operator=(const ElementSurface &rhs) ;
174
175 public:
176
177 protected:
178
179 private:
180         // object's id
181         const long __objId;
182
183 }; // ElementSurface
184
185 } } } } // Tizen::Ui::Effects::_PhysicsEngine
186
187 #endif // _FUI_EFFECTS_INTERNAL_PE_ELEMENTSURFACE_H_