1 #ifndef DALI_SCENE3D_MODEL_MOTION_BLEND_SHAPE_INDEX_H
2 #define DALI_SCENE3D_MODEL_MOTION_BLEND_SHAPE_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 BlendShapeIndex;
34 } // namespace Internal
37 * @addtogroup dali_scene3d_model_motion_blend_shape_index
42 * @brief Specialized MotionIndex to control blendshape.
43 * Specially, if ModelNodeId is Property::INVALID_KEY and BlendShapeId is StringKey,
44 * It will control all ModelNode that has the inputed BlendShape name.
48 class DALI_SCENE3D_API BlendShapeIndex : public MotionIndex
50 public: // Creation & Destruction
52 * @brief Create an initialized BlendShapeIndex.
55 * @return A handle to a newly allocated Dali resource
57 static BlendShapeIndex New();
60 * @brief Create an initialized BlendShapeIndex with values.
63 * @param[in] blendShapeId The id of blendshape what this motion index looks.
64 * @return A handle to a newly allocated Dali resource
66 static BlendShapeIndex New(Property::Key blendShapeId);
69 * @brief Create an initialized BlendShapeIndex with values.
72 * @param[in] modelNodeId The id of model node what this motion index looks.
73 * @param[in] blendShapeId The id of blendshape what this motion index looks.
74 * @return A handle to a newly allocated Dali resource
76 static BlendShapeIndex New(Property::Key modelNodeId, Property::Key blendShapeId);
79 * @brief Creates an uninitialized BlendShapeIndex.
81 * Only derived versions can be instantiated. Calling member
82 * functions with an uninitialized Dali::Object is not allowed.
91 * This is non-virtual since derived Handle types must not contain data or virtual methods.
98 * @brief Copy constructor.
101 * @param[in] blendShapeIndex Handle to an object
103 BlendShapeIndex(const BlendShapeIndex& blendShapeIndex);
106 * @brief Move constructor
109 * @param[in] rhs A reference to the moved handle
111 BlendShapeIndex(BlendShapeIndex&& rhs) noexcept;
114 * @brief Assignment operator.
117 * @param[in] blendShapeIndex Handle to an object
118 * @return reference to this
120 BlendShapeIndex& operator=(const BlendShapeIndex& blendShapeIndex);
123 * @brief Move assignment
126 * @param[in] rhs A reference to the moved handle
127 * @return A reference to this
129 BlendShapeIndex& operator=(BlendShapeIndex&& rhs) noexcept;
132 * @brief Downcasts an Object handle to BlendShapeIndex.
134 * If handle points to a BlendShapeIndex, the downcast produces valid handle.
135 * If not, the returned handle is left uninitialized.
138 * @param[in] handle Handle to an object
139 * @return Handle to a BlendShapeIndex or an uninitialized handle
141 static BlendShapeIndex DownCast(BaseHandle handle);
143 public: // Public Method
145 * @brief Set the id of BlendShape what this motion index looks.
148 * @param[in] blendShapeId The blend shape id.
150 void SetBlendShapeId(Property::Key blendShapeId);
153 * @brief Get the id of BlendShape what this motion index looks.
156 * @return The blend shape id.
158 Property::Key GetBlendShapeId() const;
160 public: // Not intended for application developers
163 * @brief Creates a handle using the Scene3D::Internal implementation.
165 * @param[in] implementation The BlendShapeIndex implementation
167 DALI_INTERNAL BlendShapeIndex(Dali::Scene3D::Internal::BlendShapeIndex* implementation);
175 } // namespace Scene3D
179 #endif // DALI_SCENE3D_MODEL_MOTION_BLEND_SHAPE_INDEX_H