2 * Copyright (c) 2022 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/controls/model/model.h>
22 #include <dali-scene3d/internal/controls/model/model-impl.h>
28 Model::Model() = default;
30 Model::Model(const Model& model) = default;
32 Model::Model(Model&& rhs) = default;
34 Model& Model::operator=(const Model& model) = default;
36 Model& Model::operator=(Model&& rhs) = default;
38 Model::~Model() = default;
40 Model Model::New(const std::string& modelUrl, const std::string& resourceDirectoryUrl)
42 return Internal::Model::New(modelUrl, resourceDirectoryUrl);
45 Model Model::DownCast(BaseHandle handle)
47 return Control::DownCast<Model, Internal::Model>(handle);
50 Model::Model(Internal::Model& implementation)
51 : Control(implementation)
55 Model::Model(Dali::Internal::CustomActor* internal)
58 VerifyCustomActorPointer<Internal::Model>(internal);
61 const Actor Model::GetModelRoot() const
63 return GetImpl(*this).GetModelRoot();
66 void Model::SetChildrenSensitive(bool enable)
68 GetImpl(*this).SetChildrenSensitive(enable);
71 bool Model::GetChildrenSensitive() const
73 return GetImpl(*this).GetChildrenSensitive();
76 void Model::SetImageBasedLightSource(const std::string& diffuseUrl, const std::string& specularUrl, float scaleFactor)
78 GetImpl(*this).SetImageBasedLightSource(diffuseUrl, specularUrl, scaleFactor);
81 void Model::SetImageBasedLightTexture(Texture diffuseTexture, Texture specularTexture, float scaleFactor)
83 GetImpl(*this).SetImageBasedLightTexture(diffuseTexture, specularTexture, scaleFactor);
86 void Model::SetImageBasedLightScaleFactor(float scaleFactor)
88 GetImpl(*this).SetImageBasedLightScaleFactor(scaleFactor);
91 float Model::GetImageBasedLightScaleFactor() const
93 return GetImpl(*this).GetImageBasedLightScaleFactor();
96 uint32_t Model::GetAnimationCount() const
98 return GetImpl(*this).GetAnimationCount();
101 Dali::Animation Model::GetAnimation(uint32_t index) const
103 return GetImpl(*this).GetAnimation(index);
106 Dali::Animation Model::GetAnimation(const std::string& name) const
108 return GetImpl(*this).GetAnimation(name);
111 } // namespace Scene3D