1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
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
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
20 // This file was automatically generated by SWIG (http://www.swig.org).
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
27 using Tizen.NUI.BaseComponents;
32 internal class Model3dView : View
34 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
36 internal Model3dView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Model3dView_SWIGUpcast(cPtr), cMemoryOwn)
38 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
41 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Model3dView obj)
43 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
46 protected override void Dispose(DisposeTypes type)
53 if (type == DisposeTypes.Explicit)
56 //Release your own managed resources here.
57 //You should release all of your own disposable objects here.
61 //Release your own unmanaged resources here.
62 //You should not access any managed member here except static instance.
63 //because the execution order of Finalizes is non-deterministic.
65 if (swigCPtr.Handle != global::System.IntPtr.Zero)
70 NDalicPINVOKE.delete_Model3dView(swigCPtr);
72 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
78 public class Property : global::System.IDisposable
80 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
81 protected bool swigCMemOwn;
83 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
85 swigCMemOwn = cMemoryOwn;
86 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
89 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
91 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
94 //A Flag to check who called Dispose(). (By User or DisposeQueue)
95 private bool isDisposeQueued = false;
96 //A Flat to check if it is already disposed.
97 protected bool disposed = false;
102 if (!isDisposeQueued)
104 isDisposeQueued = true;
105 DisposeQueue.Instance.Add(this);
109 public void Dispose()
111 //Throw excpetion if Dispose() is called in separate thread.
112 if (!Window.IsInstalled())
114 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
119 Dispose(DisposeTypes.Implicit);
123 Dispose(DisposeTypes.Explicit);
124 System.GC.SuppressFinalize(this);
128 protected virtual void Dispose(DisposeTypes type)
135 if (type == DisposeTypes.Explicit)
138 //Release your own managed resources here.
139 //You should release all of your own disposable objects here.
143 //Release your own unmanaged resources here.
144 //You should not access any managed member here except static instance.
145 //because the execution order of Finalizes is non-deterministic.
147 if (swigCPtr.Handle != global::System.IntPtr.Zero)
152 NDalicPINVOKE.delete_Model3dView_Property(swigCPtr);
154 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
160 public Property() : this(NDalicPINVOKE.new_Model3dView_Property(), true)
162 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
165 public static readonly int GEOMETRY_URL = NDalicPINVOKE.Model3dView_Property_GEOMETRY_URL_get();
166 public static readonly int MATERIAL_URL = NDalicPINVOKE.Model3dView_Property_MATERIAL_URL_get();
167 public static readonly int IMAGES_URL = NDalicPINVOKE.Model3dView_Property_IMAGES_URL_get();
168 public static readonly int ILLUMINATION_TYPE = NDalicPINVOKE.Model3dView_Property_ILLUMINATION_TYPE_get();
169 public static readonly int TEXTURE0_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE0_URL_get();
170 public static readonly int TEXTURE1_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE1_URL_get();
171 public static readonly int TEXTURE2_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE2_URL_get();
172 public static readonly int LIGHT_POSITION = NDalicPINVOKE.Model3dView_Property_LIGHT_POSITION_get();
176 public Model3dView() : this(NDalicPINVOKE.Model3dView_New__SWIG_0(), true)
178 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
181 public Model3dView(string objUrl, string mtlUrl, string imagesUrl) : this(NDalicPINVOKE.Model3dView_New__SWIG_1(objUrl, mtlUrl, imagesUrl), true)
183 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
186 public Model3dView(Model3dView model3dView) : this(NDalicPINVOKE.new_Model3dView__SWIG_1(Model3dView.getCPtr(model3dView)), true)
188 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
191 public Model3dView Assign(Model3dView model3dView)
193 Model3dView ret = new Model3dView(NDalicPINVOKE.Model3dView_Assign(swigCPtr, Model3dView.getCPtr(model3dView)), false);
194 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
198 public new static Model3dView DownCast(BaseHandle handle)
200 Model3dView ret = new Model3dView(NDalicPINVOKE.Model3dView_DownCast(BaseHandle.getCPtr(handle)), true);
201 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
205 public enum IluminationTypeEnum
208 DIFFUSE_WITH_TEXTURE,
209 DIFFUSE_WITH_NORMAL_MAP
212 public string GeometryUrl
217 GetProperty(Model3dView.Property.GEOMETRY_URL).Get(out temp);
222 SetProperty(Model3dView.Property.GEOMETRY_URL, new Tizen.NUI.PropertyValue(value));
225 public string MaterialUrl
230 GetProperty(Model3dView.Property.MATERIAL_URL).Get(out temp);
235 SetProperty(Model3dView.Property.MATERIAL_URL, new Tizen.NUI.PropertyValue(value));
238 public string ImagesUrl
243 GetProperty(Model3dView.Property.IMAGES_URL).Get(out temp);
248 SetProperty(Model3dView.Property.IMAGES_URL, new Tizen.NUI.PropertyValue(value));
251 public int IlluminationType
256 GetProperty(Model3dView.Property.ILLUMINATION_TYPE).Get(out temp);
261 SetProperty(Model3dView.Property.ILLUMINATION_TYPE, new Tizen.NUI.PropertyValue(value));
264 public string Texture0Url
269 GetProperty(Model3dView.Property.TEXTURE0_URL).Get(out temp);
274 SetProperty(Model3dView.Property.TEXTURE0_URL, new Tizen.NUI.PropertyValue(value));
277 public string Texture1Url
282 GetProperty(Model3dView.Property.TEXTURE1_URL).Get(out temp);
287 SetProperty(Model3dView.Property.TEXTURE1_URL, new Tizen.NUI.PropertyValue(value));
290 public string Texture2Url
295 GetProperty(Model3dView.Property.TEXTURE2_URL).Get(out temp);
300 SetProperty(Model3dView.Property.TEXTURE2_URL, new Tizen.NUI.PropertyValue(value));
303 public Vector3 LightPosition
307 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
308 GetProperty(Model3dView.Property.LIGHT_POSITION).Get(temp);
313 SetProperty(Model3dView.Property.LIGHT_POSITION, new Tizen.NUI.PropertyValue(value));