2 * Copyright(c) 2017 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 using Tizen.NUI.BaseComponents;
22 internal class Model3dView : View
25 internal Model3dView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.Model3DView.Model3dViewUpcast(cPtr), cMemoryOwn)
29 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Model3dView obj)
31 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
34 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
36 Interop.Model3DView.DeleteModel3dView(swigCPtr);
39 internal new class Property
41 internal static readonly int GeometryUrl = Interop.Model3DView.GeometryUrlGet();
42 internal static readonly int MaterialUrl = Interop.Model3DView.MaterialUrlGet();
43 internal static readonly int ImagesUrl = Interop.Model3DView.ImagesUrlGet();
44 internal static readonly int IlluminationType = Interop.Model3DView.IlluminationTypeGet();
45 internal static readonly int Texture0Url = Interop.Model3DView.Texture0UrlGet();
46 internal static readonly int Texture1Url = Interop.Model3DView.Texture1UrlGet();
47 internal static readonly int Texture2Url = Interop.Model3DView.Texture2UrlGet();
48 internal static readonly int LightPosition = Interop.Model3DView.LightPositionGet();
51 public Model3dView() : this(Interop.Model3DView.Model3dViewNew(), true)
53 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
56 public Model3dView(string objUrl, string mtlUrl, string imagesUrl) : this(Interop.Model3DView.Model3dViewNew(objUrl, mtlUrl, imagesUrl), true)
58 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
61 public Model3dView(Model3dView model3dView) : this(Interop.Model3DView.NewModel3dView(Model3dView.getCPtr(model3dView)), true)
63 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
66 public Model3dView Assign(Model3dView model3dView)
68 Model3dView ret = new Model3dView(Interop.Model3DView.Model3dViewAssign(SwigCPtr, Model3dView.getCPtr(model3dView)), false);
69 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
73 public static Model3dView DownCast(BaseHandle handle)
75 Model3dView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Model3dView;
76 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
80 /// <since_tizen> 3 </since_tizen>
81 public enum IluminationTypeEnum
85 DIFFUSE_WITH_NORMAL_MAP
88 public string GeometryUrl
93 GetProperty(Model3dView.Property.GeometryUrl).Get(out temp);
98 SetProperty(Model3dView.Property.GeometryUrl, new Tizen.NUI.PropertyValue(value));
101 public string MaterialUrl
106 GetProperty(Model3dView.Property.MaterialUrl).Get(out temp);
111 SetProperty(Model3dView.Property.MaterialUrl, new Tizen.NUI.PropertyValue(value));
114 public string ImagesUrl
119 GetProperty(Model3dView.Property.ImagesUrl).Get(out temp);
124 SetProperty(Model3dView.Property.ImagesUrl, new Tizen.NUI.PropertyValue(value));
127 public int IlluminationType
132 GetProperty(Model3dView.Property.IlluminationType).Get(out temp);
137 SetProperty(Model3dView.Property.IlluminationType, new Tizen.NUI.PropertyValue(value));
140 public string Texture0Url
145 GetProperty(Model3dView.Property.Texture0Url).Get(out temp);
150 SetProperty(Model3dView.Property.Texture0Url, new Tizen.NUI.PropertyValue(value));
153 public string Texture1Url
158 GetProperty(Model3dView.Property.Texture1Url).Get(out temp);
163 SetProperty(Model3dView.Property.Texture1Url, new Tizen.NUI.PropertyValue(value));
166 public string Texture2Url
171 GetProperty(Model3dView.Property.Texture2Url).Get(out temp);
176 SetProperty(Model3dView.Property.Texture2Url, new Tizen.NUI.PropertyValue(value));
179 public Vector3 LightPosition
183 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
184 GetProperty(Model3dView.Property.LightPosition).Get(temp);
189 SetProperty(Model3dView.Property.LightPosition, new Tizen.NUI.PropertyValue(value));