[dali_2.3.19] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / model3d-view / model3d-view.cpp
1 /*
2  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 // CLASS HEADER
19
20 #include <dali-toolkit/public-api/controls/model3d-view/model3d-view.h>
21
22 // INTERNAL INCLUDES
23 #include <dali-toolkit/internal/controls/model3d-view/model3d-view-impl.h>
24
25 // EXTERNAL INCLUDES
26
27 namespace Dali
28 {
29 namespace Toolkit
30 {
31 Model3dView::Model3dView()
32 {
33 }
34
35 Model3dView::Model3dView(const Model3dView& model3dView) = default;
36
37 Model3dView::Model3dView(Model3dView&& rhs) noexcept = default;
38
39 Model3dView& Model3dView::operator=(const Model3dView& model3dView) = default;
40
41 Model3dView& Model3dView::operator=(Model3dView&& rhs) noexcept = default;
42
43 Model3dView::~Model3dView()
44 {
45 }
46
47 Model3dView Model3dView::New()
48 {
49   return Internal::Model3dView::New();
50 }
51
52 Model3dView Model3dView::New(const std::string& objUrl, const std::string& mtlUrl, const std::string& imagesUrl)
53 {
54   Model3dView model3dView = Internal::Model3dView::New();
55   model3dView.SetProperty(Model3dView::Property::IMAGES_URL, Dali::Property::Value(imagesUrl));
56   model3dView.SetProperty(Model3dView::Property::GEOMETRY_URL, Dali::Property::Value(objUrl));
57   model3dView.SetProperty(Model3dView::Property::MATERIAL_URL, Dali::Property::Value(mtlUrl));
58
59   return model3dView;
60 }
61
62 Model3dView Model3dView::DownCast(BaseHandle handle)
63 {
64   return Control::DownCast<Model3dView, Internal::Model3dView>(handle);
65 }
66
67 Model3dView::Model3dView(Internal::Model3dView& implementation)
68 : Control(implementation)
69 {
70 }
71
72 Model3dView::Model3dView(Dali::Internal::CustomActor* internal)
73 : Control(internal)
74 {
75   VerifyCustomActorPointer<Internal::Model3dView>(internal);
76 }
77
78 } // namespace Toolkit
79
80 } // namespace Dali