c2c8f71f1b9e5fe99dad503c23fdb9779b7edea6
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / Model3dView.cs
1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
18 // <auto-generated />
19 //
20 // This file was automatically generated by SWIG (http://www.swig.org).
21 // Version 3.0.9
22 //
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
26
27 using Tizen.NUI.BaseComponents;
28
29 namespace Tizen.NUI
30 {
31
32     internal class Model3dView : View
33     {
34         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
35
36         internal Model3dView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Model3dView_SWIGUpcast(cPtr), cMemoryOwn)
37         {
38             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
39             // By default, we do not want the position to use the anchor point
40             PositionUsesAnchorPoint = false;
41         }
42
43         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Model3dView obj)
44         {
45             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
46         }
47
48         protected override void Dispose(DisposeTypes type)
49         {
50             if (disposed)
51             {
52                 return;
53             }
54
55             if (type == DisposeTypes.Explicit)
56             {
57                 //Called by User
58                 //Release your own managed resources here.
59                 //You should release all of your own disposable objects here.
60
61             }
62
63             //Release your own unmanaged resources here.
64             //You should not access any managed member here except static instance.
65             //because the execution order of Finalizes is non-deterministic.
66             if (swigCPtr.Handle != global::System.IntPtr.Zero)
67             {
68                 if (swigCMemOwn)
69                 {
70                     swigCMemOwn = false;
71                     NDalicPINVOKE.delete_Model3dView(swigCPtr);
72                 }
73                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
74             }
75
76             base.Dispose(type);
77         }
78
79         public class Property : global::System.IDisposable
80         {
81             private global::System.Runtime.InteropServices.HandleRef swigCPtr;
82             protected bool swigCMemOwn;
83
84             internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
85             {
86                 swigCMemOwn = cMemoryOwn;
87                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
88             }
89
90             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
91             {
92                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
93             }
94
95             //A Flag to check who called Dispose(). (By User or DisposeQueue)
96             private bool isDisposeQueued = false;
97             //A Flat to check if it is already disposed.
98             protected bool disposed = false;
99
100
101             ~Property()
102             {
103                 if (!isDisposeQueued)
104                 {
105                     isDisposeQueued = true;
106                     DisposeQueue.Instance.Add(this);
107                 }
108             }
109
110             public void Dispose()
111             {
112                 //Throw excpetion if Dispose() is called in separate thread.
113                 if (!Window.IsInstalled())
114                 {
115                     throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
116                 }
117
118                 if (isDisposeQueued)
119                 {
120                     Dispose(DisposeTypes.Implicit);
121                 }
122                 else
123                 {
124                     Dispose(DisposeTypes.Explicit);
125                     System.GC.SuppressFinalize(this);
126                 }
127             }
128
129             protected virtual void Dispose(DisposeTypes type)
130             {
131                 if (disposed)
132                 {
133                     return;
134                 }
135
136                 if (type == DisposeTypes.Explicit)
137                 {
138                     //Called by User
139                     //Release your own managed resources here.
140                     //You should release all of your own disposable objects here.
141
142                 }
143
144                 //Release your own unmanaged resources here.
145                 //You should not access any managed member here except static instance.
146                 //because the execution order of Finalizes is non-deterministic.
147
148                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
149                 {
150                     if (swigCMemOwn)
151                     {
152                         swigCMemOwn = false;
153                         NDalicPINVOKE.delete_Model3dView_Property(swigCPtr);
154                     }
155                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
156                 }
157
158                 disposed = true;
159             }
160
161             public Property() : this(NDalicPINVOKE.new_Model3dView_Property(), true)
162             {
163                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
164             }
165
166             public static readonly int GEOMETRY_URL = NDalicPINVOKE.Model3dView_Property_GEOMETRY_URL_get();
167             public static readonly int MATERIAL_URL = NDalicPINVOKE.Model3dView_Property_MATERIAL_URL_get();
168             public static readonly int IMAGES_URL = NDalicPINVOKE.Model3dView_Property_IMAGES_URL_get();
169             public static readonly int ILLUMINATION_TYPE = NDalicPINVOKE.Model3dView_Property_ILLUMINATION_TYPE_get();
170             public static readonly int TEXTURE0_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE0_URL_get();
171             public static readonly int TEXTURE1_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE1_URL_get();
172             public static readonly int TEXTURE2_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE2_URL_get();
173             public static readonly int LIGHT_POSITION = NDalicPINVOKE.Model3dView_Property_LIGHT_POSITION_get();
174
175         }
176
177         public Model3dView() : this(NDalicPINVOKE.Model3dView_New__SWIG_0(), true)
178         {
179             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
180
181         }
182         public Model3dView(string objUrl, string mtlUrl, string imagesUrl) : this(NDalicPINVOKE.Model3dView_New__SWIG_1(objUrl, mtlUrl, imagesUrl), true)
183         {
184             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
185
186         }
187         public Model3dView(Model3dView model3dView) : this(NDalicPINVOKE.new_Model3dView__SWIG_1(Model3dView.getCPtr(model3dView)), true)
188         {
189             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
190         }
191
192         public Model3dView Assign(Model3dView model3dView)
193         {
194             Model3dView ret = new Model3dView(NDalicPINVOKE.Model3dView_Assign(swigCPtr, Model3dView.getCPtr(model3dView)), false);
195             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
196             return ret;
197         }
198
199         public new static Model3dView DownCast(BaseHandle handle)
200         {
201             Model3dView ret = new Model3dView(NDalicPINVOKE.Model3dView_DownCast(BaseHandle.getCPtr(handle)), true);
202             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
203             return ret;
204         }
205
206         public enum IluminationTypeEnum
207         {
208             DIFFUSE,
209             DIFFUSE_WITH_TEXTURE,
210             DIFFUSE_WITH_NORMAL_MAP
211         }
212
213         public string GeometryUrl
214         {
215             get
216             {
217                 string temp;
218                 GetProperty(Model3dView.Property.GEOMETRY_URL).Get(out temp);
219                 return temp;
220             }
221             set
222             {
223                 SetProperty(Model3dView.Property.GEOMETRY_URL, new Tizen.NUI.PropertyValue(value));
224             }
225         }
226         public string MaterialUrl
227         {
228             get
229             {
230                 string temp;
231                 GetProperty(Model3dView.Property.MATERIAL_URL).Get(out temp);
232                 return temp;
233             }
234             set
235             {
236                 SetProperty(Model3dView.Property.MATERIAL_URL, new Tizen.NUI.PropertyValue(value));
237             }
238         }
239         public string ImagesUrl
240         {
241             get
242             {
243                 string temp;
244                 GetProperty(Model3dView.Property.IMAGES_URL).Get(out temp);
245                 return temp;
246             }
247             set
248             {
249                 SetProperty(Model3dView.Property.IMAGES_URL, new Tizen.NUI.PropertyValue(value));
250             }
251         }
252         public int IlluminationType
253         {
254             get
255             {
256                 int temp = 0;
257                 GetProperty(Model3dView.Property.ILLUMINATION_TYPE).Get(out temp);
258                 return temp;
259             }
260             set
261             {
262                 SetProperty(Model3dView.Property.ILLUMINATION_TYPE, new Tizen.NUI.PropertyValue(value));
263             }
264         }
265         public string Texture0Url
266         {
267             get
268             {
269                 string temp;
270                 GetProperty(Model3dView.Property.TEXTURE0_URL).Get(out temp);
271                 return temp;
272             }
273             set
274             {
275                 SetProperty(Model3dView.Property.TEXTURE0_URL, new Tizen.NUI.PropertyValue(value));
276             }
277         }
278         public string Texture1Url
279         {
280             get
281             {
282                 string temp;
283                 GetProperty(Model3dView.Property.TEXTURE1_URL).Get(out temp);
284                 return temp;
285             }
286             set
287             {
288                 SetProperty(Model3dView.Property.TEXTURE1_URL, new Tizen.NUI.PropertyValue(value));
289             }
290         }
291         public string Texture2Url
292         {
293             get
294             {
295                 string temp;
296                 GetProperty(Model3dView.Property.TEXTURE2_URL).Get(out temp);
297                 return temp;
298             }
299             set
300             {
301                 SetProperty(Model3dView.Property.TEXTURE2_URL, new Tizen.NUI.PropertyValue(value));
302             }
303         }
304         public Vector3 LightPosition
305         {
306             get
307             {
308                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
309                 GetProperty(Model3dView.Property.LIGHT_POSITION).Get(temp);
310                 return temp;
311             }
312             set
313             {
314                 SetProperty(Model3dView.Property.LIGHT_POSITION, new Tizen.NUI.PropertyValue(value));
315             }
316         }
317
318     }
319
320 }