[NUI.Scene3D] Add Rotation constructor using pitch,yaw,roll (#5996)
authorhuiyu <35286162+huiyueun@users.noreply.github.com>
Wed, 13 Mar 2024 05:14:47 +0000 (14:14 +0900)
committerGitHub <noreply@github.com>
Wed, 13 Mar 2024 05:14:47 +0000 (14:14 +0900)
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
src/Tizen.NUI/src/internal/Interop/Interop.Rotation.cs
src/Tizen.NUI/src/public/Common/Rotation.cs

index 7297740..cabbacc 100755 (executable)
@@ -30,6 +30,9 @@ namespace Tizen.NUI
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Rotation_2")]
             public static extern global::System.IntPtr NewRotation2(global::System.Runtime.InteropServices.HandleRef v0, global::System.Runtime.InteropServices.HandleRef v1);
 
+            [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_delete_Rotation")]
             public static extern void DeleteRotation(global::System.Runtime.InteropServices.HandleRef rotation);
 
index ea18ea7..f54870d 100755 (executable)
@@ -61,6 +61,18 @@ namespace Tizen.NUI
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
+        
+        /// <summary>
+        /// The constructor of Rotation from Euler angles.
+        /// </summary>
+        /// <param name="pitch">Pitch value as Radian.</param>
+        /// <param name="yaw">Yaw value as Radian</param>
+        /// <param name="roll">Roll value as Radian</param>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public Rotation(Radian pitch, Radian yaw, Radian roll) : this(Interop.Rotation.NewRotation3(Radian.getCPtr(pitch), Radian.getCPtr(yaw), Radian.getCPtr(roll)), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
 
         /// <summary>
         /// (0.0f,0.0f,0.0f,1.0f).