Merge "Fix for font validation." into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / model3d-view / model3d-view.cpp
1 /*
2  * Copyright (c) 2015 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
30 namespace Toolkit
31 {
32
33 Model3dView::Model3dView()
34 {}
35
36 Model3dView::Model3dView( const Model3dView& model3dView )
37 : Control( model3dView )
38 {
39 }
40
41 Model3dView& Model3dView::operator=( const Model3dView& model3dView )
42 {
43   if( &model3dView != this )
44   {
45     Control::operator=( model3dView );
46   }
47   return *this;
48 }
49
50 Model3dView::~Model3dView()
51 {
52 }
53
54 Model3dView Model3dView::New()
55 {
56   return Internal::Model3dView::New();
57 }
58
59 Model3dView Model3dView::New( const std::string& objUrl, const std::string& mtlUrl, const std::string& imagesUrl )
60 {
61   Model3dView model3dView = Internal::Model3dView::New();
62   model3dView.SetProperty( Model3dView::Property::GEOMETRY_URL, Dali::Property::Value( objUrl ) );
63   model3dView.SetProperty( Model3dView::Property::MATERIAL_URL, Dali::Property::Value( mtlUrl ) );
64   model3dView.SetProperty( Model3dView::Property::IMAGES_URL, Dali::Property::Value( imagesUrl ) );
65
66   return model3dView;
67 }
68
69 Model3dView Model3dView::DownCast( BaseHandle handle )
70 {
71   return Control::DownCast<Model3dView, Internal::Model3dView>(handle);
72 }
73
74 Model3dView::Model3dView( Internal::Model3dView& implementation )
75  : Control( implementation )
76 {
77 }
78
79 Model3dView::Model3dView( Dali::Internal::CustomActor* internal )
80  : Control( internal )
81 {
82   VerifyCustomActorPointer<Internal::Model3dView>( internal );
83 }
84
85 } // namespace Toolkit
86
87 } // namespace Dali