1 #ifndef DALI_SCENE3D_MODEL_MOTION_MOTION_TRANSFORM_INDEX_IMPL_H
2 #define DALI_SCENE3D_MODEL_MOTION_MOTION_TRANSFORM_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/internal/model-motion/motion-index/motion-index-impl.h>
28 #include <dali-scene3d/public-api/model-motion/motion-index/motion-transform-index.h>
36 using MotionTransformIndexPtr = IntrusivePtr<MotionTransformIndex>;
39 * @brief Internal data for Scene3D::MotionTransformIndex.
41 class MotionTransformIndex : public MotionIndex
43 public: // Creation & Destruction
45 * @brief Create a new MotionTransformIndex object.
46 * @return A smart-pointer to the newly allocated MotionTransformIndex.
48 static MotionTransformIndexPtr New();
52 * @brief Construct a new MotionTransformIndex.
54 MotionTransformIndex();
57 * @brief Second-phase constructor.
62 * @brief Virtual destructor.
64 virtual ~MotionTransformIndex();
66 public: // Public Method
68 * @copydoc Dali::Scene3D::MotionTransformIndex::SetTransformType()
70 void SetTransformType(Scene3D::MotionTransformIndex::TransformType type);
73 * @copydoc Dali::Scene3D::BlendShapeIndex::GetTransformType()
75 Scene3D::MotionTransformIndex::TransformType GetTransformType() const;
77 public: // MotionIndex Override Method
79 * @copydoc Dali::Scene3D::Internal::MotionIndex::GetPropertyName()
81 std::string GetPropertyName(Scene3D::ModelNode node = Scene3D::ModelNode()) override;
84 * @copydoc Dali::Scene3D::Internal::MotionIndex::GetPropertyIndex()
86 Property::Index GetPropertyIndex(Scene3D::ModelNode node = Scene3D::ModelNode()) override;
89 Scene3D::MotionTransformIndex::TransformType mTransformType{Scene3D::MotionTransformIndex::TransformType::INVALID}; ///< The type of transform
92 } // namespace Internal
94 // Helpers for public-api forwarding methods
96 inline Internal::MotionTransformIndex& GetImplementation(Dali::Scene3D::MotionTransformIndex& motionTransformIndex)
98 DALI_ASSERT_ALWAYS(motionTransformIndex && "MotionTransformIndex handle is empty");
100 BaseObject& handle = motionTransformIndex.GetBaseObject();
102 return static_cast<Internal::MotionTransformIndex&>(handle);
105 inline const Internal::MotionTransformIndex& GetImplementation(const Dali::Scene3D::MotionTransformIndex& motionTransformIndex)
107 DALI_ASSERT_ALWAYS(motionTransformIndex && "MotionTransformIndex handle is empty");
109 const BaseObject& handle = motionTransformIndex.GetBaseObject();
111 return static_cast<const Internal::MotionTransformIndex&>(handle);
114 } // namespace Scene3D
118 #endif // DALI_SCENE3D_MODEL_MOTION_MOTION_TRANSFORM_INDEX_IMPL_H