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