[NUI] Make ModelView API
authorSeungho Baek <sbsh.baek@samsung.com>
Fri, 10 Sep 2021 12:25:15 +0000 (21:25 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 9 Nov 2021 05:57:53 +0000 (14:57 +0900)
Signed-off-by: Seungho Baek <sbsh.baek@samsung.com>
src/Tizen.NUI/src/internal/Interop/Interop.ModelView.cs [moved from src/Tizen.NUI/src/internal/Interop/Interop.Model3DView.cs with 70% similarity]
src/Tizen.NUI/src/public/BaseComponents/ModelView.cs [moved from src/Tizen.NUI/src/internal/Common/Model3dView.cs with 52% similarity]

@@ -19,7 +19,7 @@ namespace Tizen.NUI
 {
     internal static partial class Interop
     {
-        internal static partial class Model3DView
+        internal static partial class ModelView
         {
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Model3dView_Property_GEOMETRY_URL_get")]
             public static extern int GeometryUrlGet();
@@ -46,34 +46,34 @@ namespace Tizen.NUI
             public static extern int LightPositionGet();
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Model3dView_Property")]
-            public static extern global::System.IntPtr NewModel3dViewProperty();
+            public static extern global::System.IntPtr NewModelViewProperty();
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_Model3dView_Property")]
-            public static extern void DeleteModel3dViewProperty(global::System.Runtime.InteropServices.HandleRef jarg1);
+            public static extern void DeleteModelViewProperty(global::System.Runtime.InteropServices.HandleRef jarg1);
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Model3dView_New__SWIG_0")]
-            public static extern global::System.IntPtr Model3dViewNew();
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Model3dView_New_SWIG_0")]
+            public static extern global::System.IntPtr ModelViewNew();
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Model3dView_New__SWIG_1")]
-            public static extern global::System.IntPtr Model3dViewNew(string jarg1, string jarg2, string jarg3);
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Model3dView_New_SWIG_1")]
+            public static extern global::System.IntPtr ModelViewNew(string jarg1, string jarg2, string jarg3);
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Model3dView__SWIG_0")]
-            public static extern global::System.IntPtr NewModel3dView();
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Model3dView_SWIG_0")]
+            public static extern global::System.IntPtr NewModelView();
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_Model3dView")]
-            public static extern void DeleteModel3dView(global::System.Runtime.InteropServices.HandleRef jarg1);
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Model3dView_SWIG_1")]
+            public static extern global::System.IntPtr NewModelView(global::System.Runtime.InteropServices.HandleRef jarg1);
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Model3dView__SWIG_1")]
-            public static extern global::System.IntPtr NewModel3dView(global::System.Runtime.InteropServices.HandleRef jarg1);
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_Model3dView")]
+            public static extern void DeleteModelView(global::System.Runtime.InteropServices.HandleRef jarg1);
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Model3dView_Assign")]
-            public static extern global::System.IntPtr Model3dViewAssign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+            public static extern global::System.IntPtr ModelViewAssign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Model3dView_DownCast")]
-            public static extern global::System.IntPtr Model3dViewDownCast(global::System.Runtime.InteropServices.HandleRef jarg1);
+            public static extern global::System.IntPtr ModelViewDownCast(global::System.Runtime.InteropServices.HandleRef jarg1);
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Model3dView_SWIGUpcast")]
-            public static extern global::System.IntPtr Model3dViewUpcast(global::System.IntPtr jarg1);
+            public static extern global::System.IntPtr ModelViewUpcast(global::System.IntPtr jarg1);
         }
     }
 }
  *
  */
 
-using Tizen.NUI.BaseComponents;
+using System;
+using System.Runtime.InteropServices;
+using System.ComponentModel;
+using Tizen.NUI.Binding;
 
-namespace Tizen.NUI
+namespace Tizen.NUI.BaseComponents
 {
-    internal class Model3dView : View
+    // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public class ModelView : View
     {
-        internal Model3dView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+        internal ModelView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
         {
         }
 
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
         {
-            Interop.Model3DView.DeleteModel3dView(swigCPtr);
+            Interop.ModelView.DeleteModelView(swigCPtr);
         }
 
         internal new class Property
         {
-            internal static readonly int GeometryUrl = Interop.Model3DView.GeometryUrlGet();
-            internal static readonly int MaterialUrl = Interop.Model3DView.MaterialUrlGet();
-            internal static readonly int ImagesUrl = Interop.Model3DView.ImagesUrlGet();
-            internal static readonly int IlluminationType = Interop.Model3DView.IlluminationTypeGet();
-            internal static readonly int Texture0Url = Interop.Model3DView.Texture0UrlGet();
-            internal static readonly int Texture1Url = Interop.Model3DView.Texture1UrlGet();
-            internal static readonly int Texture2Url = Interop.Model3DView.Texture2UrlGet();
-            internal static readonly int LightPosition = Interop.Model3DView.LightPositionGet();
+            internal static readonly int GeometryUrl = Interop.ModelView.GeometryUrlGet();
+            internal static readonly int MaterialUrl = Interop.ModelView.MaterialUrlGet();
+            internal static readonly int ImagesUrl = Interop.ModelView.ImagesUrlGet();
+            internal static readonly int IlluminationType = Interop.ModelView.IlluminationTypeGet();
+            internal static readonly int Texture0Url = Interop.ModelView.Texture0UrlGet();
+            internal static readonly int Texture1Url = Interop.ModelView.Texture1UrlGet();
+            internal static readonly int Texture2Url = Interop.ModelView.Texture2UrlGet();
+            internal static readonly int LightPosition = Interop.ModelView.LightPositionGet();
         }
 
-        public Model3dView() : this(Interop.Model3DView.Model3dViewNew(), true)
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public ModelView() : this(Interop.ModelView.ModelViewNew(), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
         }
-        public Model3dView(string objUrl, string mtlUrl, string imagesUrl) : this(Interop.Model3DView.Model3dViewNew(objUrl, mtlUrl, imagesUrl), true)
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public ModelView(string objUrl, string mtlUrl, string imagesUrl) : this(Interop.ModelView.ModelViewNew(objUrl, mtlUrl, imagesUrl), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
         }
-        public Model3dView(Model3dView model3dView) : this(Interop.Model3DView.NewModel3dView(Model3dView.getCPtr(model3dView)), true)
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public ModelView(ModelView ModelView) : this(Interop.ModelView.NewModelView(ModelView.getCPtr(ModelView)), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        public Model3dView Assign(Model3dView model3dView)
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public ModelView Assign(ModelView ModelView)
         {
-            Model3dView ret = new Model3dView(Interop.Model3DView.Model3dViewAssign(SwigCPtr, Model3dView.getCPtr(model3dView)), false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        public static Model3dView DownCast(BaseHandle handle)
-        {
-            Model3dView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Model3dView;
+            ModelView ret = new ModelView(Interop.ModelView.ModelViewAssign(SwigCPtr, ModelView.getCPtr(ModelView)), false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public enum IluminationTypeEnum
         {
-            DIFFUSE,
-            DIFFUSE_WITH_TEXTURE,
-            DIFFUSE_WITH_NORMAL_MAP
+            Diffuse,
+            DiffuseWithTexture,
+            DiffuseWithNormalMap
         }
 
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public string GeometryUrl
         {
             get
             {
                 string retVal = "";
-                PropertyValue geometry = GetProperty(Model3dView.Property.GeometryUrl);
+                PropertyValue geometry = GetProperty(ModelView.Property.GeometryUrl);
                 geometry?.Get(out retVal);
                 geometry?.Dispose();
                 return retVal;
@@ -91,16 +103,19 @@ namespace Tizen.NUI
             set
             {
                 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
-                SetProperty(Model3dView.Property.GeometryUrl, setVal);
+                SetProperty(ModelView.Property.GeometryUrl, setVal);
                 setVal?.Dispose();
             }
         }
+
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public string MaterialUrl
         {
             get
             {
                 string retVal = "";
-                PropertyValue material = GetProperty(Model3dView.Property.MaterialUrl);
+                PropertyValue material = GetProperty(ModelView.Property.MaterialUrl);
                 material?.Get(out retVal);
                 material?.Dispose();
                 return retVal;
@@ -108,16 +123,19 @@ namespace Tizen.NUI
             set
             {
                 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
-                SetProperty(Model3dView.Property.MaterialUrl, setVal);
+                SetProperty(ModelView.Property.MaterialUrl, setVal);
                 setVal?.Dispose();
             }
         }
+
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public string ImagesUrl
         {
             get
             {
                 string retVal = "";
-                PropertyValue images = GetProperty(Model3dView.Property.ImagesUrl);
+                PropertyValue images = GetProperty(ModelView.Property.ImagesUrl);
                 images?.Get(out retVal);
                 images?.Dispose();
                 return retVal;
@@ -125,16 +143,19 @@ namespace Tizen.NUI
             set
             {
                 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
-                SetProperty(Model3dView.Property.ImagesUrl, setVal);
+                SetProperty(ModelView.Property.ImagesUrl, setVal);
                 setVal?.Dispose();
             }
         }
+
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public int IlluminationType
         {
             get
             {
                 int retVal = 0;
-                PropertyValue illumination = GetProperty(Model3dView.Property.IlluminationType);
+                PropertyValue illumination = GetProperty(ModelView.Property.IlluminationType);
                 illumination?.Get(out retVal);
                 illumination?.Dispose();
                 return retVal;
@@ -142,16 +163,19 @@ namespace Tizen.NUI
             set
             {
                 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
-                SetProperty(Model3dView.Property.IlluminationType, setVal);
+                SetProperty(ModelView.Property.IlluminationType, setVal);
                 setVal?.Dispose();
             }
         }
+
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public string Texture0Url
         {
             get
             {
                 string retVal = "";
-                PropertyValue texture0 = GetProperty(Model3dView.Property.Texture0Url);
+                PropertyValue texture0 = GetProperty(ModelView.Property.Texture0Url);
                 texture0?.Get(out retVal);
                 texture0?.Dispose();
                 return retVal;
@@ -159,16 +183,19 @@ namespace Tizen.NUI
             set
             {
                 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
-                SetProperty(Model3dView.Property.Texture0Url, setVal);
+                SetProperty(ModelView.Property.Texture0Url, setVal);
                 setVal?.Dispose();
             }
         }
+
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public string Texture1Url
         {
             get
             {
                 string retVal = "";
-                PropertyValue texture1 = GetProperty(Model3dView.Property.Texture1Url);
+                PropertyValue texture1 = GetProperty(ModelView.Property.Texture1Url);
                 texture1?.Get(out retVal);
                 texture1?.Dispose();
                 return retVal;
@@ -176,16 +203,19 @@ namespace Tizen.NUI
             set
             {
                 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
-                SetProperty(Model3dView.Property.Texture1Url, setVal);
+                SetProperty(ModelView.Property.Texture1Url, setVal);
                 setVal?.Dispose();
             }
         }
+
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public string Texture2Url
         {
             get
             {
                 string retVal = "";
-                PropertyValue texture2 = GetProperty(Model3dView.Property.Texture2Url);
+                PropertyValue texture2 = GetProperty(ModelView.Property.Texture2Url);
                 texture2?.Get(out retVal);
                 texture2?.Dispose();
                 return retVal;
@@ -193,16 +223,19 @@ namespace Tizen.NUI
             set
             {
                 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
-                SetProperty(Model3dView.Property.Texture2Url, setVal);
+                SetProperty(ModelView.Property.Texture2Url, setVal);
                 setVal?.Dispose();
             }
         }
+
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public Vector3 LightPosition
         {
             get
             {
                 Vector3 retVal = new Vector3(0.0f, 0.0f, 0.0f);
-                PropertyValue lightPos = GetProperty(Model3dView.Property.LightPosition);
+                PropertyValue lightPos = GetProperty(ModelView.Property.LightPosition);
                 lightPos?.Get(retVal);
                 lightPos?.Dispose();
                 return retVal;
@@ -210,7 +243,7 @@ namespace Tizen.NUI
             set
             {
                 PropertyValue setVal = new Tizen.NUI.PropertyValue(value);
-                SetProperty(Model3dView.Property.LightPosition, setVal);
+                SetProperty(ModelView.Property.LightPosition, setVal);
                 setVal?.Dispose();
             }
         }