2 * Copyright(c) 2021 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
24 internal Model3dView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
28 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Model3dView obj)
30 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
33 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
35 Interop.Model3DView.DeleteModel3dView(swigCPtr);
38 internal new class Property
40 internal static readonly int GeometryUrl = Interop.Model3DView.GeometryUrlGet();
41 internal static readonly int MaterialUrl = Interop.Model3DView.MaterialUrlGet();
42 internal static readonly int ImagesUrl = Interop.Model3DView.ImagesUrlGet();
43 internal static readonly int IlluminationType = Interop.Model3DView.IlluminationTypeGet();
44 internal static readonly int Texture0Url = Interop.Model3DView.Texture0UrlGet();
45 internal static readonly int Texture1Url = Interop.Model3DView.Texture1UrlGet();
46 internal static readonly int Texture2Url = Interop.Model3DView.Texture2UrlGet();
47 internal static readonly int LightPosition = Interop.Model3DView.LightPositionGet();
50 public Model3dView() : this(Interop.Model3DView.Model3dViewNew(), true)
52 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
55 public Model3dView(string objUrl, string mtlUrl, string imagesUrl) : this(Interop.Model3DView.Model3dViewNew(objUrl, mtlUrl, imagesUrl), true)
57 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
60 public Model3dView(Model3dView model3dView) : this(Interop.Model3DView.NewModel3dView(Model3dView.getCPtr(model3dView)), true)
62 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
65 public Model3dView Assign(Model3dView model3dView)
67 Model3dView ret = new Model3dView(Interop.Model3DView.Model3dViewAssign(SwigCPtr, Model3dView.getCPtr(model3dView)), false);
68 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
72 public static Model3dView DownCast(BaseHandle handle)
74 Model3dView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Model3dView;
75 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
79 public enum IluminationTypeEnum
83 DIFFUSE_WITH_NORMAL_MAP
86 public string GeometryUrl
91 PropertyValue geometry = GetProperty(Model3dView.Property.GeometryUrl);
92 geometry?.Get(out retVal);
98 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
99 SetProperty(Model3dView.Property.GeometryUrl, setVal);
103 public string MaterialUrl
108 PropertyValue material = GetProperty(Model3dView.Property.MaterialUrl);
109 material?.Get(out retVal);
115 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
116 SetProperty(Model3dView.Property.MaterialUrl, setVal);
120 public string ImagesUrl
125 PropertyValue images = GetProperty(Model3dView.Property.ImagesUrl);
126 images?.Get(out retVal);
132 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
133 SetProperty(Model3dView.Property.ImagesUrl, setVal);
137 public int IlluminationType
142 PropertyValue illumination = GetProperty(Model3dView.Property.IlluminationType);
143 illumination?.Get(out retVal);
144 illumination?.Dispose();
149 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
150 SetProperty(Model3dView.Property.IlluminationType, setVal);
154 public string Texture0Url
159 PropertyValue texture0 = GetProperty(Model3dView.Property.Texture0Url);
160 texture0?.Get(out retVal);
166 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
167 SetProperty(Model3dView.Property.Texture0Url, setVal);
171 public string Texture1Url
176 PropertyValue texture1 = GetProperty(Model3dView.Property.Texture1Url);
177 texture1?.Get(out retVal);
183 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
184 SetProperty(Model3dView.Property.Texture1Url, setVal);
188 public string Texture2Url
193 PropertyValue texture2 = GetProperty(Model3dView.Property.Texture2Url);
194 texture2?.Get(out retVal);
200 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
201 SetProperty(Model3dView.Property.Texture2Url, setVal);
205 public Vector3 LightPosition
209 Vector3 retVal = new Vector3(0.0f, 0.0f, 0.0f);
210 PropertyValue lightPos = GetProperty(Model3dView.Property.LightPosition);
211 lightPos?.Get(retVal);
217 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
218 SetProperty(Model3dView.Property.LightPosition, setVal);