1 #ifndef DALI_SCENE3D_MODEL_MOTION_MOTION_VALUE_IMPL_H
2 #define DALI_SCENE3D_MODEL_MOTION_MOTION_VALUE_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-value.h>
35 using MotionValuePtr = IntrusivePtr<MotionValue>;
38 * @brief Internal data for Scene3D::MotionValue.
40 class MotionValue : public BaseObject
42 public: // Creation & Destruction
44 * @brief Create a new MotionValue object.
45 * @return A smart-pointer to the newly allocated MotionValue.
47 static MotionValuePtr New();
51 * @brief Construct a new MotionValue.
56 * @brief Second-phase constructor.
61 * @brief Virtual destructor.
63 virtual ~MotionValue();
65 public: // Public Method
67 * @copydoc Dali::Scene3D::MotionValue::GetValueType()
69 Scene3D::MotionValue::ValueType GetValueType() const;
72 * @copydoc Dali::Scene3D::MotionValue::SetValue()
74 void SetValue(Property::Value propertyValue);
77 * @copydoc Dali::Scene3D::MotionValue::SetValue()
79 void SetValue(Dali::KeyFrames keyFrames);
82 * @copydoc Dali::Scene3D::MotionValue::Clear()
87 * @copydoc Dali::Scene3D::MotionValue::GetPropertyValue()
89 Property::Value GetPropertyValue() const;
92 * @copydoc Dali::Scene3D::MotionValue::GetKeyFrames()
94 KeyFrames GetKeyFrames() const;
97 Scene3D::MotionValue::ValueType mType{Scene3D::MotionValue::ValueType::INVALID};
99 Property::Value mPropertyValue{};
100 Dali::KeyFrames mKeyFrames{};
103 } // namespace Internal
105 // Helpers for public-api forwarding methods
107 inline Internal::MotionValue& GetImplementation(Dali::Scene3D::MotionValue& motionValue)
109 DALI_ASSERT_ALWAYS(motionValue && "MotionValue handle is empty");
111 BaseObject& handle = motionValue.GetBaseObject();
113 return static_cast<Internal::MotionValue&>(handle);
116 inline const Internal::MotionValue& GetImplementation(const Dali::Scene3D::MotionValue& motionValue)
118 DALI_ASSERT_ALWAYS(motionValue && "MotionValue handle is empty");
120 const BaseObject& handle = motionValue.GetBaseObject();
122 return static_cast<const Internal::MotionValue&>(handle);
125 } // namespace Scene3D
129 #endif // DALI_SCENE3D_MODEL_MOTION_MOTION_VALUE_IMPL_H