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>
32 Model::Model(const Model& model) = default;
34 Model::Model(Model&& rhs) = default;
36 Model& Model::operator=(const Model& model) = default;
38 Model& Model::operator=(Model&& rhs) = default;
44 Model Model::New(const std::string& modelUrl, const std::string& resourceDirectoryUrl)
46 return Internal::Model::New(modelUrl, resourceDirectoryUrl);
49 Model Model::DownCast(BaseHandle handle)
51 return Control::DownCast<Model, Internal::Model>(handle);
54 Model::Model(Internal::Model& implementation)
55 : Control(implementation)
59 Model::Model(Dali::Internal::CustomActor* internal)
62 VerifyCustomActorPointer<Internal::Model>(internal);
65 const Actor Model::GetModelRoot() const
67 return GetImpl(*this).GetModelRoot();
70 void Model::SetChildrenSensitive(bool enable)
72 GetImpl(*this).SetChildrenSensitive(enable);
75 bool Model::GetChildrenSensitive() const
77 return GetImpl(*this).GetChildrenSensitive();
80 void Model::SetImageBasedLightSource(const std::string& diffuseUrl, const std::string& specularUrl, float scaleFactor)
82 GetImpl(*this).SetImageBasedLightSource(diffuseUrl, specularUrl, scaleFactor);
85 void Model::SetImageBasedLightTexture(Texture diffuseTexture, Texture specularTexture, float scaleFactor)
87 GetImpl(*this).SetImageBasedLightTexture(diffuseTexture, specularTexture, scaleFactor);
90 void Model::SetImageBasedLightScaleFactor(float scaleFactor)
92 GetImpl(*this).SetImageBasedLightScaleFactor(scaleFactor);
95 float Model::GetImageBasedLightScaleFactor() const
97 return GetImpl(*this).GetImageBasedLightScaleFactor();
100 uint32_t Model::GetAnimationCount() const
102 return GetImpl(*this).GetAnimationCount();
105 Dali::Animation Model::GetAnimation(uint32_t index) const
107 return GetImpl(*this).GetAnimation(index);
110 Dali::Animation Model::GetAnimation(const std::string& name) const
112 return GetImpl(*this).GetAnimation(name);
115 } // namespace Scene3D