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/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::SetChildrenFocusable(bool enable)
82 GetImpl(*this).SetChildrenFocusable(enable);
85 bool Model::GetChildrenFocusable() const
87 return GetImpl(*this).GetChildrenFocusable();
90 void Model::SetImageBasedLightSource(const std::string& diffuseUrl, const std::string& specularUrl, float scaleFactor)
92 GetImpl(*this).SetImageBasedLightSource(diffuseUrl, specularUrl, scaleFactor);
95 void Model::SetImageBasedLightScaleFactor(float scaleFactor)
97 GetImpl(*this).SetImageBasedLightScaleFactor(scaleFactor);
100 float Model::GetImageBasedLightScaleFactor() const
102 return GetImpl(*this).GetImageBasedLightScaleFactor();
105 uint32_t Model::GetAnimationCount() const
107 return GetImpl(*this).GetAnimationCount();
110 Dali::Animation Model::GetAnimation(uint32_t index) const
112 return GetImpl(*this).GetAnimation(index);
115 Dali::Animation Model::GetAnimation(const std::string& name) const
117 return GetImpl(*this).GetAnimation(name);
120 uint32_t Model::GetCameraCount() const
122 return GetImpl(*this).GetCameraCount();
125 Dali::CameraActor Model::GenerateCamera(uint32_t index) const
127 return GetImpl(*this).GenerateCamera(index);
130 bool Model::ApplyCamera(uint32_t index, Dali::CameraActor camera) const
132 return GetImpl(*this).ApplyCamera(index, camera);
135 } // namespace Scene3D