7c66870b6f53f8af1b2e5af09d04d0f1e444f081
[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
67             if (swigCPtr.Handle != global::System.IntPtr.Zero)
68             {
69                 if (swigCMemOwn)
70                 {
71                     swigCMemOwn = false;
72                     NDalicPINVOKE.delete_Model3dView(swigCPtr);
73                 }
74                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
75             }
76
77             base.Dispose(type);
78         }
79
80         public class Property : global::System.IDisposable
81         {
82             private global::System.Runtime.InteropServices.HandleRef swigCPtr;
83             protected bool swigCMemOwn;
84
85             internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
86             {
87                 swigCMemOwn = cMemoryOwn;
88                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
89             }
90
91             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
92             {
93                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
94             }
95
96             //A Flag to check who called Dispose(). (By User or DisposeQueue)
97             private bool isDisposeQueued = false;
98             //A Flat to check if it is already disposed.
99             protected bool disposed = false;
100
101
102             ~Property()
103             {
104                 if (!isDisposeQueued)
105                 {
106                     isDisposeQueued = true;
107                     DisposeQueue.Instance.Add(this);
108                 }
109             }
110
111             public void Dispose()
112             {
113                 //Throw excpetion if Dispose() is called in separate thread.
114                 if (!Window.IsInstalled())
115                 {
116                     throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
117                 }
118
119                 if (isDisposeQueued)
120                 {
121                     Dispose(DisposeTypes.Implicit);
122                 }
123                 else
124                 {
125                     Dispose(DisposeTypes.Explicit);
126                     System.GC.SuppressFinalize(this);
127                 }
128             }
129
130             protected virtual void Dispose(DisposeTypes type)
131             {
132                 if (disposed)
133                 {
134                     return;
135                 }
136
137                 if (type == DisposeTypes.Explicit)
138                 {
139                     //Called by User
140                     //Release your own managed resources here.
141                     //You should release all of your own disposable objects here.
142
143                 }
144
145                 //Release your own unmanaged resources here.
146                 //You should not access any managed member here except static instance.
147                 //because the execution order of Finalizes is non-deterministic.
148
149                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
150                 {
151                     if (swigCMemOwn)
152                     {
153                         swigCMemOwn = false;
154                         NDalicPINVOKE.delete_Model3dView_Property(swigCPtr);
155                     }
156                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
157                 }
158
159                 disposed = true;
160             }
161
162             public Property() : this(NDalicPINVOKE.new_Model3dView_Property(), true)
163             {
164                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
165             }
166
167             public static readonly int GEOMETRY_URL = NDalicPINVOKE.Model3dView_Property_GEOMETRY_URL_get();
168             public static readonly int MATERIAL_URL = NDalicPINVOKE.Model3dView_Property_MATERIAL_URL_get();
169             public static readonly int IMAGES_URL = NDalicPINVOKE.Model3dView_Property_IMAGES_URL_get();
170             public static readonly int ILLUMINATION_TYPE = NDalicPINVOKE.Model3dView_Property_ILLUMINATION_TYPE_get();
171             public static readonly int TEXTURE0_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE0_URL_get();
172             public static readonly int TEXTURE1_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE1_URL_get();
173             public static readonly int TEXTURE2_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE2_URL_get();
174             public static readonly int LIGHT_POSITION = NDalicPINVOKE.Model3dView_Property_LIGHT_POSITION_get();
175
176         }
177
178         public Model3dView() : this(NDalicPINVOKE.Model3dView_New__SWIG_0(), true)
179         {
180             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
181
182         }
183         public Model3dView(string objUrl, string mtlUrl, string imagesUrl) : this(NDalicPINVOKE.Model3dView_New__SWIG_1(objUrl, mtlUrl, imagesUrl), true)
184         {
185             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
186
187         }
188         public Model3dView(Model3dView model3dView) : this(NDalicPINVOKE.new_Model3dView__SWIG_1(Model3dView.getCPtr(model3dView)), true)
189         {
190             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
191         }
192
193         public Model3dView Assign(Model3dView model3dView)
194         {
195             Model3dView ret = new Model3dView(NDalicPINVOKE.Model3dView_Assign(swigCPtr, Model3dView.getCPtr(model3dView)), false);
196             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197             return ret;
198         }
199
200         public new static Model3dView DownCast(BaseHandle handle)
201         {
202             Model3dView ret = new Model3dView(NDalicPINVOKE.Model3dView_DownCast(BaseHandle.getCPtr(handle)), true);
203             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
204             return ret;
205         }
206
207         public enum IluminationTypeEnum
208         {
209             DIFFUSE,
210             DIFFUSE_WITH_TEXTURE,
211             DIFFUSE_WITH_NORMAL_MAP
212         }
213
214         public string GeometryUrl
215         {
216             get
217             {
218                 string temp;
219                 GetProperty(Model3dView.Property.GEOMETRY_URL).Get(out temp);
220                 return temp;
221             }
222             set
223             {
224                 SetProperty(Model3dView.Property.GEOMETRY_URL, new Tizen.NUI.PropertyValue(value));
225             }
226         }
227         public string MaterialUrl
228         {
229             get
230             {
231                 string temp;
232                 GetProperty(Model3dView.Property.MATERIAL_URL).Get(out temp);
233                 return temp;
234             }
235             set
236             {
237                 SetProperty(Model3dView.Property.MATERIAL_URL, new Tizen.NUI.PropertyValue(value));
238             }
239         }
240         public string ImagesUrl
241         {
242             get
243             {
244                 string temp;
245                 GetProperty(Model3dView.Property.IMAGES_URL).Get(out temp);
246                 return temp;
247             }
248             set
249             {
250                 SetProperty(Model3dView.Property.IMAGES_URL, new Tizen.NUI.PropertyValue(value));
251             }
252         }
253         public int IlluminationType
254         {
255             get
256             {
257                 int temp = 0;
258                 GetProperty(Model3dView.Property.ILLUMINATION_TYPE).Get(out temp);
259                 return temp;
260             }
261             set
262             {
263                 SetProperty(Model3dView.Property.ILLUMINATION_TYPE, new Tizen.NUI.PropertyValue(value));
264             }
265         }
266         public string Texture0Url
267         {
268             get
269             {
270                 string temp;
271                 GetProperty(Model3dView.Property.TEXTURE0_URL).Get(out temp);
272                 return temp;
273             }
274             set
275             {
276                 SetProperty(Model3dView.Property.TEXTURE0_URL, new Tizen.NUI.PropertyValue(value));
277             }
278         }
279         public string Texture1Url
280         {
281             get
282             {
283                 string temp;
284                 GetProperty(Model3dView.Property.TEXTURE1_URL).Get(out temp);
285                 return temp;
286             }
287             set
288             {
289                 SetProperty(Model3dView.Property.TEXTURE1_URL, new Tizen.NUI.PropertyValue(value));
290             }
291         }
292         public string Texture2Url
293         {
294             get
295             {
296                 string temp;
297                 GetProperty(Model3dView.Property.TEXTURE2_URL).Get(out temp);
298                 return temp;
299             }
300             set
301             {
302                 SetProperty(Model3dView.Property.TEXTURE2_URL, new Tizen.NUI.PropertyValue(value));
303             }
304         }
305         public Vector3 LightPosition
306         {
307             get
308             {
309                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
310                 GetProperty(Model3dView.Property.LIGHT_POSITION).Get(temp);
311                 return temp;
312             }
313             set
314             {
315                 SetProperty(Model3dView.Property.LIGHT_POSITION, new Tizen.NUI.PropertyValue(value));
316             }
317         }
318
319     }
320
321 }