530d4f1a467c40c216d44b38dc080dc2e0636403
[platform/core/uifw/dali-toolkit.git] / dali-scene3d / public-api / controls / scene-view / scene-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-scene3d/public-api/controls/scene-view/scene-view.h>
20
21 // INTERNAL INCLUDES
22 #include <dali-scene3d/internal/controls/scene-view/scene-view-impl.h>
23
24 namespace Dali
25 {
26 namespace Scene3D
27 {
28 SceneView::SceneView()
29 {
30 }
31
32 SceneView::SceneView(const SceneView& sceneView) = default;
33
34 SceneView::SceneView(SceneView&& rhs) = default;
35
36 SceneView& SceneView::operator=(const SceneView& sceneView) = default;
37
38 SceneView& SceneView::operator=(SceneView&& rhs) = default;
39
40 SceneView::~SceneView()
41 {
42 }
43
44 SceneView SceneView::New()
45 {
46   return Internal::SceneView::New();
47 }
48
49 SceneView SceneView::DownCast(BaseHandle handle)
50 {
51   return Control::DownCast<SceneView, Internal::SceneView>(handle);
52 }
53
54 SceneView::SceneView(Internal::SceneView& implementation)
55 : Control(implementation)
56 {
57 }
58
59 SceneView::SceneView(Dali::Internal::CustomActor* internal)
60 : Control(internal)
61 {
62   VerifyCustomActorPointer<Internal::SceneView>(internal);
63 }
64
65 void SceneView::AddCamera(Dali::CameraActor camera)
66 {
67   GetImpl(*this).AddCamera(camera);
68 }
69
70 void SceneView::RemoveCamera(CameraActor camera)
71 {
72   GetImpl(*this).RemoveCamera(camera);
73 }
74
75 uint32_t SceneView::GetCameraCount() const
76 {
77   return GetImpl(*this).GetCameraCount();
78 }
79
80 CameraActor SceneView::GetSelectedCamera() const
81 {
82   return GetImpl(*this).GetSelectedCamera();
83 }
84
85 CameraActor SceneView::GetCamera(uint32_t index) const
86 {
87   return GetImpl(*this).GetCamera(index);
88 }
89
90 CameraActor SceneView::GetCamera(const std::string& name) const
91 {
92   return GetImpl(*this).GetCamera(name);
93 }
94
95 void SceneView::SelectCamera(uint32_t index)
96 {
97   GetImpl(*this).SelectCamera(index);
98 }
99
100 void SceneView::SelectCamera(const std::string& name)
101 {
102   GetImpl(*this).SelectCamera(name);
103 }
104
105 void SceneView::SetImageBasedLightSource(const std::string& diffuse, const std::string& specular, float scaleFactor)
106 {
107   GetImpl(*this).SetImageBasedLightSource(diffuse, specular, scaleFactor);
108 }
109
110 void SceneView::SetImageBasedLightScaleFactor(float scaleFactor)
111 {
112   GetImpl(*this).SetImageBasedLightScaleFactor(scaleFactor);
113 }
114
115 float SceneView::GetImageBasedLightScaleFactor() const
116 {
117   return GetImpl(*this).GetImageBasedLightScaleFactor();
118 }
119
120 void SceneView::UseFramebuffer(bool useFramebuffer)
121 {
122   GetImpl(*this).UseFramebuffer(useFramebuffer);
123 }
124
125 bool SceneView::IsUsingFramebuffer() const
126 {
127   return GetImpl(*this).IsUsingFramebuffer();
128 }
129
130 } // namespace Scene3D
131
132 } // namespace Dali