[NUI] Add new constructor to Rotation by using Quaternion vector4 as input parameter
authorseungho baek <sbsh.baek@samsung.com>
Thu, 25 May 2023 02:00:16 +0000 (11:00 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 31 May 2023 05:47:13 +0000 (14:47 +0900)
Signed-off-by: seungho baek <sbsh.baek@samsung.com>
src/Tizen.NUI/src/internal/Interop/Interop.Rotation.cs
src/Tizen.NUI/src/public/Common/Rotation.cs

index 3273505..6940622 100755 (executable)
@@ -33,6 +33,9 @@ namespace Tizen.NUI
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Rotation_3")]
             public static extern global::System.IntPtr NewRotation3(global::System.Runtime.InteropServices.HandleRef pitch, global::System.Runtime.InteropServices.HandleRef yaw, global::System.Runtime.InteropServices.HandleRef roll);
 
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Rotation_4")]
+            public static extern global::System.IntPtr NewRotation4(global::System.Runtime.InteropServices.HandleRef vector4);
+
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_Rotation")]
             public static extern void DeleteRotation(global::System.Runtime.InteropServices.HandleRef rotation);
 
index 2c303f0..3eac9a4 100755 (executable)
@@ -75,6 +75,16 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// The constructor of Rotation from Quaternion Vector4.
+        /// </summary>
+        /// <param name="vector">Quaternion vector for Rotation.</param>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public Rotation(Vector4 vector) : this(Interop.Rotation.NewRotation4(Vector4.getCPtr(vector)), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
         /// (0.0f,0.0f,0.0f,1.0f).
         /// </summary>
         /// <since_tizen> 3 </since_tizen>