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 public enum IluminationTypeEnum
84 DIFFUSE_WITH_NORMAL_MAP
87 public string GeometryUrl
92 PropertyValue geometry = GetProperty(Model3dView.Property.GeometryUrl);
93 geometry?.Get(out retVal);
99 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
100 SetProperty(Model3dView.Property.GeometryUrl, setVal);
104 public string MaterialUrl
109 PropertyValue material = GetProperty(Model3dView.Property.MaterialUrl);
110 material?.Get(out retVal);
116 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
117 SetProperty(Model3dView.Property.MaterialUrl, setVal);
121 public string ImagesUrl
126 PropertyValue images = GetProperty(Model3dView.Property.ImagesUrl);
127 images?.Get(out retVal);
133 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
134 SetProperty(Model3dView.Property.ImagesUrl, setVal);
138 public int IlluminationType
143 PropertyValue illumination = GetProperty(Model3dView.Property.IlluminationType);
144 illumination?.Get(out retVal);
145 illumination?.Dispose();
150 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
151 SetProperty(Model3dView.Property.IlluminationType, setVal);
155 public string Texture0Url
160 PropertyValue texture0 = GetProperty(Model3dView.Property.Texture0Url);
161 texture0?.Get(out retVal);
167 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
168 SetProperty(Model3dView.Property.Texture0Url, setVal);
172 public string Texture1Url
177 PropertyValue texture1 = GetProperty(Model3dView.Property.Texture1Url);
178 texture1?.Get(out retVal);
184 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
185 SetProperty(Model3dView.Property.Texture1Url, setVal);
189 public string Texture2Url
194 PropertyValue texture2 = GetProperty(Model3dView.Property.Texture2Url);
195 texture2?.Get(out retVal);
201 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
202 SetProperty(Model3dView.Property.Texture2Url, setVal);
206 public Vector3 LightPosition
210 Vector3 retVal = new Vector3(0.0f, 0.0f, 0.0f);
211 PropertyValue lightPos = GetProperty(Model3dView.Property.LightPosition);
212 lightPos?.Get(retVal);
218 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
219 SetProperty(Model3dView.Property.LightPosition, setVal);