2 * Copyright (c) 2023 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali-scene3d/public-api/model-motion/motion-value.h>
22 #include <dali-scene3d/internal/model-motion/motion-value-impl.h>
28 MotionValue MotionValue::New()
30 Internal::MotionValuePtr internal = Internal::MotionValue::New();
32 return MotionValue(internal.Get());
35 MotionValue MotionValue::New(Property::Value propertyValue)
37 Internal::MotionValuePtr internal = Internal::MotionValue::New();
39 internal->SetValue(propertyValue);
41 return MotionValue(internal.Get());
44 MotionValue MotionValue::New(KeyFrames keyFrames)
46 Internal::MotionValuePtr internal = Internal::MotionValue::New();
48 internal->SetValue(keyFrames);
50 return MotionValue(internal.Get());
53 MotionValue::MotionValue()
57 MotionValue::MotionValue(const MotionValue& motionValue) = default;
59 MotionValue::MotionValue(MotionValue&& rhs) noexcept = default;
61 MotionValue::~MotionValue()
65 MotionValue& MotionValue::operator=(const MotionValue& handle) = default;
67 MotionValue& MotionValue::operator=(MotionValue&& rhs) noexcept = default;
69 MotionValue MotionValue::DownCast(BaseHandle handle)
71 return MotionValue(dynamic_cast<Dali::Scene3D::Internal::MotionValue*>(handle.GetObjectPtr()));
74 MotionValue::MotionValue(Dali::Scene3D::Internal::MotionValue* internal)
75 : BaseHandle(internal)
81 MotionValue::ValueType MotionValue::GetValueType() const
83 return GetImplementation(*this).GetValueType();
86 void MotionValue::SetValue(Property::Value propertyValue)
88 GetImplementation(*this).SetValue(propertyValue);
91 void MotionValue::SetValue(KeyFrames keyFrames)
93 GetImplementation(*this).SetValue(keyFrames);
96 void MotionValue::Invalidate()
101 void MotionValue::Clear()
103 GetImplementation(*this).Clear();
106 Property::Value MotionValue::GetPropertyValue() const
108 return GetImplementation(*this).GetPropertyValue();
111 KeyFrames MotionValue::GetKeyFrames() const
113 return GetImplementation(*this).GetKeyFrames();
116 } // namespace Scene3D