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-view/model-view.h>
22 #include <dali-scene3d/internal/controls/model-view/model-view-impl.h>
28 ModelView::ModelView()
32 ModelView::ModelView(const ModelView& modelView) = default;
34 ModelView::ModelView(ModelView&& rhs) = default;
36 ModelView& ModelView::operator=(const ModelView& modelView) = default;
38 ModelView& ModelView::operator=(ModelView&& rhs) = default;
40 ModelView::~ModelView()
44 ModelView ModelView::New(const std::string& modelPath, const std::string& resourcePath)
46 return Internal::ModelView::New(modelPath, resourcePath);
49 ModelView ModelView::DownCast(BaseHandle handle)
51 return Control::DownCast<ModelView, Internal::ModelView>(handle);
54 ModelView::ModelView(Internal::ModelView& implementation)
55 : Control(implementation)
59 ModelView::ModelView(Dali::Internal::CustomActor* internal)
62 VerifyCustomActorPointer<Internal::ModelView>(internal);
65 const Actor ModelView::GetModelRoot()
67 return GetImpl(*this).GetModelRoot();
70 void ModelView::FitSize(bool fit)
72 GetImpl(*this).FitSize(fit);
75 void ModelView::FitCenter(bool fit)
77 GetImpl(*this).FitCenter(fit);
80 void ModelView::SetImageBasedLightSource(const std::string& diffuse, const std::string& specular, float scaleFactor)
82 GetImpl(*this).SetImageBasedLightSource(diffuse, specular, scaleFactor);
85 uint32_t ModelView::GetAnimationCount()
87 return GetImpl(*this).GetAnimationCount();
90 Dali::Animation ModelView::GetAnimation(uint32_t index)
92 return GetImpl(*this).GetAnimation(index);
95 Dali::Animation ModelView::GetAnimation(const std::string& name)
97 return GetImpl(*this).GetAnimation(name);
100 } // namespace Scene3D