1 #ifndef DALI_SCENE3D_MODEL_MOTION_MOTION_INDEX_IMPL_H
2 #define DALI_SCENE3D_MODEL_MOTION_MOTION_INDEX_IMPL_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.
22 #include <dali/public-api/common/dali-common.h>
23 #include <dali/public-api/common/intrusive-ptr.h>
24 #include <dali/public-api/object/base-object.h>
27 #include <dali-scene3d/public-api/model-motion/motion-index/motion-index.h>
35 using MotionIndexPtr = IntrusivePtr<MotionIndex>;
38 * @brief Internal abstract data for Scene3D::MotionIndex.
39 * The drived class can implemet there own GetPropertyIndex() and GetPropertyName() API.
41 class MotionIndex : public BaseObject
45 * @brief Construct a new MotionIndex.
50 * @brief Virtual destructor.
52 virtual ~MotionIndex();
54 public: // Public Method
56 * @copydoc Dali::Scene3D::MotionIndex::SetModelNodeId()
58 void SetModelNodeId(Property::Key modelNodeId);
61 * @copydoc Dali::Scene3D::MotionIndex::GetModelNodeId()
63 Property::Key GetModelNodeId() const;
65 public: // Virtual Method
67 * @copydoc Dali::Scene3D::MotionIndex::GetPropertyName()
69 virtual std::string GetPropertyName(Scene3D::ModelNode node = Scene3D::ModelNode()) = 0;
72 * @copydoc Dali::Scene3D::MotionIndex::GetPropertyIndex()
74 virtual Property::Index GetPropertyIndex(Scene3D::ModelNode node = Scene3D::ModelNode()) = 0;
77 Property::Key mModelNodeId{Property::INVALID_KEY}; ///< The id of model node
80 } // namespace Internal
82 // Helpers for public-api forwarding methods
84 inline Internal::MotionIndex& GetImplementation(Dali::Scene3D::MotionIndex& motionIndex)
86 DALI_ASSERT_ALWAYS(motionIndex && "MotionIndex handle is empty");
88 BaseObject& handle = motionIndex.GetBaseObject();
90 return static_cast<Internal::MotionIndex&>(handle);
93 inline const Internal::MotionIndex& GetImplementation(const Dali::Scene3D::MotionIndex& motionIndex)
95 DALI_ASSERT_ALWAYS(motionIndex && "MotionIndex handle is empty");
97 const BaseObject& handle = motionIndex.GetBaseObject();
99 return static_cast<const Internal::MotionIndex&>(handle);
102 } // namespace Scene3D
106 #endif // DALI_SCENE3D_MODEL_MOTION_MOTION_INDEX_IMPL_H