[NUI] Integration from dalihub (DALi 1.4.34) (#999)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / Model3dView.cs
1 /*
2  * Copyright(c) 2017 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 using Tizen.NUI.BaseComponents;
19
20 namespace Tizen.NUI
21 {
22     internal class Model3dView : View
23     {
24         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
25
26         internal Model3dView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.Model3DView.Model3dView_SWIGUpcast(cPtr), cMemoryOwn)
27         {
28             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
29         }
30
31         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Model3dView obj)
32         {
33             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
34         }
35
36         protected override void Dispose(DisposeTypes type)
37         {
38             if (disposed)
39             {
40                 return;
41             }
42
43             //Release your own unmanaged resources here.
44             //You should not access any managed member here except static instance.
45             //because the execution order of Finalizes is non-deterministic.
46
47             if (swigCPtr.Handle != global::System.IntPtr.Zero)
48             {
49                 if (swigCMemOwn)
50                 {
51                     swigCMemOwn = false;
52                     Interop.Model3DView.delete_Model3dView(swigCPtr);
53                 }
54                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
55             }
56
57             base.Dispose(type);
58         }
59
60         internal new class Property
61         {
62             internal static readonly int GEOMETRY_URL = Interop.Model3DView.Model3dView_Property_GEOMETRY_URL_get();
63             internal static readonly int MATERIAL_URL = Interop.Model3DView.Model3dView_Property_MATERIAL_URL_get();
64             internal static readonly int IMAGES_URL = Interop.Model3DView.Model3dView_Property_IMAGES_URL_get();
65             internal static readonly int ILLUMINATION_TYPE = Interop.Model3DView.Model3dView_Property_ILLUMINATION_TYPE_get();
66             internal static readonly int TEXTURE0_URL = Interop.Model3DView.Model3dView_Property_TEXTURE0_URL_get();
67             internal static readonly int TEXTURE1_URL = Interop.Model3DView.Model3dView_Property_TEXTURE1_URL_get();
68             internal static readonly int TEXTURE2_URL = Interop.Model3DView.Model3dView_Property_TEXTURE2_URL_get();
69             internal static readonly int LIGHT_POSITION = Interop.Model3DView.Model3dView_Property_LIGHT_POSITION_get();
70         }
71
72         public Model3dView() : this(Interop.Model3DView.Model3dView_New__SWIG_0(), true)
73         {
74             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
75
76         }
77         public Model3dView(string objUrl, string mtlUrl, string imagesUrl) : this(Interop.Model3DView.Model3dView_New__SWIG_1(objUrl, mtlUrl, imagesUrl), true)
78         {
79             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
80
81         }
82         public Model3dView(Model3dView model3dView) : this(Interop.Model3DView.new_Model3dView__SWIG_1(Model3dView.getCPtr(model3dView)), true)
83         {
84             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
85         }
86
87         public Model3dView Assign(Model3dView model3dView)
88         {
89             Model3dView ret = new Model3dView(Interop.Model3DView.Model3dView_Assign(swigCPtr, Model3dView.getCPtr(model3dView)), false);
90             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
91             return ret;
92         }
93
94         public static Model3dView DownCast(BaseHandle handle)
95         {
96             Model3dView ret =  Registry.GetManagedBaseHandleFromNativePtr(handle) as Model3dView;
97             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
98             return ret;
99         }
100
101         /// <since_tizen> 3 </since_tizen>
102         public enum IluminationTypeEnum
103         {
104             DIFFUSE,
105             DIFFUSE_WITH_TEXTURE,
106             DIFFUSE_WITH_NORMAL_MAP
107         }
108
109         public string GeometryUrl
110         {
111             get
112             {
113                 string temp;
114                 GetProperty(Model3dView.Property.GEOMETRY_URL).Get(out temp);
115                 return temp;
116             }
117             set
118             {
119                 SetProperty(Model3dView.Property.GEOMETRY_URL, new Tizen.NUI.PropertyValue(value));
120             }
121         }
122         public string MaterialUrl
123         {
124             get
125             {
126                 string temp;
127                 GetProperty(Model3dView.Property.MATERIAL_URL).Get(out temp);
128                 return temp;
129             }
130             set
131             {
132                 SetProperty(Model3dView.Property.MATERIAL_URL, new Tizen.NUI.PropertyValue(value));
133             }
134         }
135         public string ImagesUrl
136         {
137             get
138             {
139                 string temp;
140                 GetProperty(Model3dView.Property.IMAGES_URL).Get(out temp);
141                 return temp;
142             }
143             set
144             {
145                 SetProperty(Model3dView.Property.IMAGES_URL, new Tizen.NUI.PropertyValue(value));
146             }
147         }
148         public int IlluminationType
149         {
150             get
151             {
152                 int temp = 0;
153                 GetProperty(Model3dView.Property.ILLUMINATION_TYPE).Get(out temp);
154                 return temp;
155             }
156             set
157             {
158                 SetProperty(Model3dView.Property.ILLUMINATION_TYPE, new Tizen.NUI.PropertyValue(value));
159             }
160         }
161         public string Texture0Url
162         {
163             get
164             {
165                 string temp;
166                 GetProperty(Model3dView.Property.TEXTURE0_URL).Get(out temp);
167                 return temp;
168             }
169             set
170             {
171                 SetProperty(Model3dView.Property.TEXTURE0_URL, new Tizen.NUI.PropertyValue(value));
172             }
173         }
174         public string Texture1Url
175         {
176             get
177             {
178                 string temp;
179                 GetProperty(Model3dView.Property.TEXTURE1_URL).Get(out temp);
180                 return temp;
181             }
182             set
183             {
184                 SetProperty(Model3dView.Property.TEXTURE1_URL, new Tizen.NUI.PropertyValue(value));
185             }
186         }
187         public string Texture2Url
188         {
189             get
190             {
191                 string temp;
192                 GetProperty(Model3dView.Property.TEXTURE2_URL).Get(out temp);
193                 return temp;
194             }
195             set
196             {
197                 SetProperty(Model3dView.Property.TEXTURE2_URL, new Tizen.NUI.PropertyValue(value));
198             }
199         }
200         public Vector3 LightPosition
201         {
202             get
203             {
204                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
205                 GetProperty(Model3dView.Property.LIGHT_POSITION).Get(temp);
206                 return temp;
207             }
208             set
209             {
210                 SetProperty(Model3dView.Property.LIGHT_POSITION, new Tizen.NUI.PropertyValue(value));
211             }
212         }
213     }
214 }