Merge "Use Renderer::BlendMode::USE_ACTOR_OPACITY instead to use depth write mode...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / scene3d-view / scene3d-view.cpp
1 /*
2  * Copyright (c) 2022 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 #include <dali-toolkit/devel-api/controls/scene3d-view/scene3d-view.h>
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/internal/controls/scene3d-view/scene3d-view-impl.h>
23
24 namespace Dali
25 {
26 namespace Toolkit
27 {
28 Scene3dView::Scene3dView()
29 {
30 }
31
32 Scene3dView::~Scene3dView()
33 {
34 }
35
36 Scene3dView::Scene3dView(const Scene3dView& handle) = default;
37
38 Scene3dView& Scene3dView::operator=(const Scene3dView& handle) = default;
39
40 Scene3dView::Scene3dView(Scene3dView&& rhs) = default;
41
42 Scene3dView& Scene3dView::operator=(Scene3dView&& rhs) = default;
43
44 Scene3dView Scene3dView::New(const std::string& filePath)
45 {
46   return Internal::Scene3dView::New(filePath);
47 }
48
49 Scene3dView Scene3dView::New(const std::string& filePath, const std::string& diffuseTexturePath, const std::string& specularTexturePath, Vector4 scaleFactor)
50 {
51   return Internal::Scene3dView::New(filePath, diffuseTexturePath, specularTexturePath, scaleFactor);
52 }
53
54 Scene3dView::Scene3dView(Internal::Scene3dView& implementation)
55 : Control(implementation)
56 {
57 }
58
59 Scene3dView::Scene3dView(Dali::Internal::CustomActor* internal)
60 : Control(internal)
61 {
62   VerifyCustomActorPointer<Internal::Scene3dView>(internal);
63 }
64
65 Scene3dView Scene3dView::DownCast(BaseHandle handle)
66 {
67   return Control::DownCast<Scene3dView, Internal::Scene3dView>(handle);
68 }
69
70 uint32_t Scene3dView::GetAnimationCount()
71 {
72   return GetImpl(*this).GetAnimationCount();
73 }
74
75 bool Scene3dView::PlayAnimation(uint32_t index)
76 {
77   return GetImpl(*this).PlayAnimation(index);
78 }
79
80 bool Scene3dView::PlayAnimations()
81 {
82   return GetImpl(*this).PlayAnimations();
83 }
84
85 bool Scene3dView::SetLight(LightType type, Vector3 lightVector, Vector3 lightColor)
86 {
87   return GetImpl(*this).SetLight(type, lightVector, lightColor);
88 }
89
90 CameraActor Scene3dView::GetDefaultCamera()
91 {
92   return GetImpl(*this).GetDefaultCamera();
93 }
94
95 uint32_t Scene3dView::GetCameraCount()
96 {
97   return GetImpl(*this).GetCameraCount();
98 }
99
100 CameraActor Scene3dView::GetCamera(uint32_t cameraIndex)
101 {
102   return GetImpl(*this).GetCamera(cameraIndex);
103 }
104
105 } //namespace Toolkit
106
107 } //namespace Dali