1 #ifndef DALI_SCENE3D_MODEL_MOTION_MOTION_PROPERTY_INDEX_H
2 #define DALI_SCENE3D_MODEL_MOTION_MOTION_PROPERTY_INDEX_H
5 * Copyright (c) 2023 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
24 #include <dali-scene3d/public-api/model-motion/motion-index/motion-index.h>
30 //Forward declarations.
33 class MotionPropertyIndex;
34 } // namespace Internal
37 * @addtogroup dali_scene3d_model_motion_motion_property_index
42 * @brief Basic MotionIndex to control dali property.
46 class DALI_SCENE3D_API MotionPropertyIndex : public MotionIndex
48 public: // Creation & Destruction
50 * @brief Create an initialized MotionPropertyIndex.
53 * @return A handle to a newly allocated Dali resource
55 static MotionPropertyIndex New();
58 * @brief Create an initialized MotionPropertyIndex with values.
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
65 static MotionPropertyIndex New(Property::Key modelNodeId, Property::Key propertyId);
68 * @brief Creates an uninitialized MotionPropertyIndex.
70 * Only derived versions can be instantiated. Calling member
71 * functions with an uninitialized Dali::Object is not allowed.
75 MotionPropertyIndex();
80 * This is non-virtual since derived Handle types must not contain data or virtual methods.
84 ~MotionPropertyIndex();
87 * @brief Copy constructor.
90 * @param[in] motionPropertyIndex Handle to an object
92 MotionPropertyIndex(const MotionPropertyIndex& motionPropertyIndex);
95 * @brief Move constructor
98 * @param[in] rhs A reference to the moved handle
100 MotionPropertyIndex(MotionPropertyIndex&& rhs) noexcept;
103 * @brief Assignment operator.
106 * @param[in] motionPropertyIndex Handle to an object
107 * @return reference to this
109 MotionPropertyIndex& operator=(const MotionPropertyIndex& motionPropertyIndex);
112 * @brief Move assignment
115 * @param[in] rhs A reference to the moved handle
116 * @return A reference to this
118 MotionPropertyIndex& operator=(MotionPropertyIndex&& rhs) noexcept;
121 * @brief Downcasts an Object handle to MotionPropertyIndex.
123 * If handle points to a MotionPropertyIndex, the downcast produces valid handle.
124 * If not, the returned handle is left uninitialized.
127 * @param[in] handle Handle to an object
128 * @return Handle to a MotionPropertyIndex or an uninitialized handle
130 static MotionPropertyIndex DownCast(BaseHandle handle);
132 public: // Public Method
134 * @brief Set the id of property what this motion index looks.
137 * @param[in] propertyId The property id.
139 void SetPropertyId(Property::Key propertyId);
142 * @brief Get the id of property what this motion index looks.
145 * @return The blend shape id.
147 Property::Key GetPropertyId() const;
149 public: // Not intended for application developers
152 * @brief Creates a handle using the Scene3D::Internal implementation.
154 * @param[in] implementation The MotionPropertyIndex implementation
156 DALI_INTERNAL MotionPropertyIndex(Dali::Scene3D::Internal::MotionPropertyIndex* implementation);
164 } // namespace Scene3D
168 #endif // DALI_SCENE3D_MODEL_MOTION_MOTION_PROPERTY_INDEX_H