[Tizen] Add MotionData class and generate Animation by this
[platform/core/uifw/dali-toolkit.git] / dali-scene3d / public-api / model-motion / motion-index / motion-property-index.h
1 #ifndef DALI_SCENE3D_MODEL_MOTION_MOTION_PROPERTY_INDEX_H
2 #define DALI_SCENE3D_MODEL_MOTION_MOTION_PROPERTY_INDEX_H
3
4 /*
5  * Copyright (c) 2023 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22
23 // INTERNAL INCLUDES
24 #include <dali-scene3d/public-api/model-motion/motion-index/motion-index.h>
25
26 namespace Dali
27 {
28 namespace Scene3D
29 {
30 //Forward declarations.
31 namespace Internal
32 {
33 class MotionPropertyIndex;
34 } // namespace Internal
35
36 /**
37  * @addtogroup dali_scene3d_model_motion_motion_property_index
38  * @{
39  */
40
41 /**
42  * @brief Basic MotionIndex to control dali property.
43  *
44  * @SINCE_2_2.99
45  */
46 class DALI_SCENE3D_API MotionPropertyIndex : public MotionIndex
47 {
48 public: // Creation & Destruction
49   /**
50    * @brief Create an initialized MotionPropertyIndex.
51    *
52    * @SINCE_2_2.99
53    * @return A handle to a newly allocated Dali resource
54    */
55   static MotionPropertyIndex New();
56
57   /**
58    * @brief Create an initialized MotionPropertyIndex with values.
59    *
60    * @SINCE_2_2.99
61    * @param[in] modelNodeId The id of model node what this motion index looks.
62    * @param[in] propertyId The id of property what this motion index looks.
63    * @return A handle to a newly allocated Dali resource
64    */
65   static MotionPropertyIndex New(Property::Key modelNodeId, Property::Key propertyId);
66
67   /**
68    * @brief Creates an uninitialized MotionPropertyIndex.
69    *
70    * Only derived versions can be instantiated. Calling member
71    * functions with an uninitialized Dali::Object is not allowed.
72    *
73    * @SINCE_2_2.99
74    */
75   MotionPropertyIndex();
76
77   /**
78    * @brief Destructor.
79    *
80    * This is non-virtual since derived Handle types must not contain data or virtual methods.
81    *
82    * @SINCE_2_2.99
83    */
84   ~MotionPropertyIndex();
85
86   /**
87    * @brief Copy constructor.
88    *
89    * @SINCE_2_2.99
90    * @param[in] motionPropertyIndex Handle to an object
91    */
92   MotionPropertyIndex(const MotionPropertyIndex& motionPropertyIndex);
93
94   /**
95    * @brief Move constructor
96    *
97    * @SINCE_2_2.99
98    * @param[in] rhs A reference to the moved handle
99    */
100   MotionPropertyIndex(MotionPropertyIndex&& rhs) noexcept;
101
102   /**
103    * @brief Assignment operator.
104    *
105    * @SINCE_2_2.99
106    * @param[in] motionPropertyIndex Handle to an object
107    * @return reference to this
108    */
109   MotionPropertyIndex& operator=(const MotionPropertyIndex& motionPropertyIndex);
110
111   /**
112    * @brief Move assignment
113    *
114    * @SINCE_2_2.99
115    * @param[in] rhs A reference to the moved handle
116    * @return A reference to this
117    */
118   MotionPropertyIndex& operator=(MotionPropertyIndex&& rhs) noexcept;
119
120   /**
121    * @brief Downcasts an Object handle to MotionPropertyIndex.
122    *
123    * If handle points to a MotionPropertyIndex, the downcast produces valid handle.
124    * If not, the returned handle is left uninitialized.
125    *
126    * @SINCE_2_2.99
127    * @param[in] handle Handle to an object
128    * @return Handle to a MotionPropertyIndex or an uninitialized handle
129    */
130   static MotionPropertyIndex DownCast(BaseHandle handle);
131
132 public: // Public Method
133   /**
134    * @brief Set the id of property what this motion index looks.
135    *
136    * @SINCE_2_2.99
137    * @param[in] propertyId The property id.
138    */
139   void SetPropertyId(Property::Key propertyId);
140
141   /**
142    * @brief Get the id of property what this motion index looks.
143    *
144    * @SINCE_2_2.99
145    * @return The blend shape id.
146    */
147   Property::Key GetPropertyId() const;
148
149 public: // Not intended for application developers
150   /// @cond internal
151   /**
152    * @brief Creates a handle using the Scene3D::Internal implementation.
153    *
154    * @param[in] implementation The MotionPropertyIndex implementation
155    */
156   DALI_INTERNAL MotionPropertyIndex(Dali::Scene3D::Internal::MotionPropertyIndex* implementation);
157   /// @endcond
158 };
159
160 /**
161  * @}
162  */
163
164 } // namespace Scene3D
165
166 } // namespace Dali
167
168 #endif // DALI_SCENE3D_MODEL_MOTION_MOTION_PROPERTY_INDEX_H