aa8b7408313f2dff4f103724c58adb49dfbdd3de
[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     internal class Model3dView : View {
32   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
33
34   internal Model3dView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Model3dView_SWIGUpcast(cPtr), cMemoryOwn) {
35     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
36   }
37
38   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Model3dView obj) {
39     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
40   }
41
42   public override void Dispose() {
43     if (!Window.IsInstalled()) {
44       DisposeQueue.Instance.Add(this);
45       return;
46     }
47
48     lock(this) {
49       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
50         if (swigCMemOwn) {
51           swigCMemOwn = false;
52           NDalicPINVOKE.delete_Model3dView(swigCPtr);
53         }
54         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
55       }
56       global::System.GC.SuppressFinalize(this);
57       base.Dispose();
58     }
59   }
60
61
62   public class Property : global::System.IDisposable {
63     private global::System.Runtime.InteropServices.HandleRef swigCPtr;
64     protected bool swigCMemOwn;
65   
66     internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
67       swigCMemOwn = cMemoryOwn;
68       swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
69     }
70   
71     internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
72       return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
73     }
74   
75     ~Property() {
76       DisposeQueue.Instance.Add(this);
77     }
78   
79     public virtual void Dispose() {
80       if (!Window.IsInstalled()) {
81         DisposeQueue.Instance.Add(this);
82         return;
83       }
84
85       lock(this) {
86         if (swigCPtr.Handle != global::System.IntPtr.Zero) {
87           if (swigCMemOwn) {
88             swigCMemOwn = false;
89             NDalicPINVOKE.delete_Model3dView_Property(swigCPtr);
90           }
91           swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
92         }
93         global::System.GC.SuppressFinalize(this);
94       }
95     }
96   
97     public Property() : this(NDalicPINVOKE.new_Model3dView_Property(), true) {
98       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
99     }
100   
101     public static readonly int GEOMETRY_URL = NDalicPINVOKE.Model3dView_Property_GEOMETRY_URL_get();
102     public static readonly int MATERIAL_URL = NDalicPINVOKE.Model3dView_Property_MATERIAL_URL_get();
103     public static readonly int IMAGES_URL = NDalicPINVOKE.Model3dView_Property_IMAGES_URL_get();
104     public static readonly int ILLUMINATION_TYPE = NDalicPINVOKE.Model3dView_Property_ILLUMINATION_TYPE_get();
105     public static readonly int TEXTURE0_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE0_URL_get();
106     public static readonly int TEXTURE1_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE1_URL_get();
107     public static readonly int TEXTURE2_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE2_URL_get();
108     public static readonly int LIGHT_POSITION = NDalicPINVOKE.Model3dView_Property_LIGHT_POSITION_get();
109   
110   }
111
112   public Model3dView () : this (NDalicPINVOKE.Model3dView_New__SWIG_0(), true) {
113       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
114
115   }
116   public Model3dView (string objUrl, string mtlUrl, string imagesUrl) : this (NDalicPINVOKE.Model3dView_New__SWIG_1(objUrl, mtlUrl, imagesUrl), true) {
117       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
118
119   }
120   public Model3dView(Model3dView model3dView) : this(NDalicPINVOKE.new_Model3dView__SWIG_1(Model3dView.getCPtr(model3dView)), true) {
121     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
122   }
123
124   public Model3dView Assign(Model3dView model3dView) {
125     Model3dView ret = new Model3dView(NDalicPINVOKE.Model3dView_Assign(swigCPtr, Model3dView.getCPtr(model3dView)), false);
126     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
127     return ret;
128   }
129
130   public new static Model3dView DownCast(BaseHandle handle) {
131     Model3dView ret = new Model3dView(NDalicPINVOKE.Model3dView_DownCast(BaseHandle.getCPtr(handle)), true);
132     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133     return ret;
134   }
135
136   public enum PropertyRange {
137     PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
138     PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000,
139     ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX,
140     ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX+1000
141   }
142
143   public enum IluminationTypeEnum {
144     DIFFUSE,
145     DIFFUSE_WITH_TEXTURE,
146     DIFFUSE_WITH_NORMAL_MAP
147   }
148
149   public string GeometryUrl
150   {
151     get
152     {
153       string temp;
154       GetProperty( Model3dView.Property.GEOMETRY_URL).Get( out temp );
155       return temp;
156     }
157     set
158     {
159       SetProperty( Model3dView.Property.GEOMETRY_URL, new Tizen.NUI.PropertyValue( value ) );
160     }
161   }
162   public string MaterialUrl
163   {
164     get
165     {
166       string temp;
167       GetProperty( Model3dView.Property.MATERIAL_URL).Get( out temp );
168       return temp;
169     }
170     set
171     {
172       SetProperty( Model3dView.Property.MATERIAL_URL, new Tizen.NUI.PropertyValue( value ) );
173     }
174   }
175   public string ImagesUrl
176   {
177     get
178     {
179       string temp;
180       GetProperty( Model3dView.Property.IMAGES_URL).Get( out temp );
181       return temp;
182     }
183     set
184     {
185       SetProperty( Model3dView.Property.IMAGES_URL, new Tizen.NUI.PropertyValue( value ) );
186     }
187   }
188   public int IlluminationType
189   {
190     get
191     {
192       int temp = 0;
193       GetProperty( Model3dView.Property.ILLUMINATION_TYPE).Get( ref temp );
194       return temp;
195     }
196     set
197     {
198       SetProperty( Model3dView.Property.ILLUMINATION_TYPE, new Tizen.NUI.PropertyValue( value ) );
199     }
200   }
201   public string Texture0Url
202   {
203     get
204     {
205       string temp;
206       GetProperty( Model3dView.Property.TEXTURE0_URL).Get( out temp );
207       return temp;
208     }
209     set
210     {
211       SetProperty( Model3dView.Property.TEXTURE0_URL, new Tizen.NUI.PropertyValue( value ) );
212     }
213   }
214   public string Texture1Url
215   {
216     get
217     {
218       string temp;
219       GetProperty( Model3dView.Property.TEXTURE1_URL).Get( out temp );
220       return temp;
221     }
222     set
223     {
224       SetProperty( Model3dView.Property.TEXTURE1_URL, new Tizen.NUI.PropertyValue( value ) );
225     }
226   }
227   public string Texture2Url
228   {
229     get
230     {
231       string temp;
232       GetProperty( Model3dView.Property.TEXTURE2_URL).Get( out temp );
233       return temp;
234     }
235     set
236     {
237       SetProperty( Model3dView.Property.TEXTURE2_URL, new Tizen.NUI.PropertyValue( value ) );
238     }
239   }
240   public Vector3 LightPosition
241   {
242     get
243     {
244       Vector3 temp = new Vector3(0.0f,0.0f,0.0f);
245       GetProperty( Model3dView.Property.LIGHT_POSITION).Get(  temp );
246       return temp;
247     }
248     set
249     {
250       SetProperty( Model3dView.Property.LIGHT_POSITION, new Tizen.NUI.PropertyValue( value ) );
251     }
252   }
253
254 }
255
256 }