From: huiyu <35286162+huiyueun@users.noreply.github.com> Date: Wed, 13 Mar 2024 05:14:47 +0000 (+0900) Subject: [NUI.Scene3D] Add Rotation constructor using pitch,yaw,roll (#5996) X-Git-Tag: submit/tizen_7.0/20240313.151015~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62c50c65fdbaebfecf526e49988cd05f6896770d;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI.Scene3D] Add Rotation constructor using pitch,yaw,roll (#5996) Signed-off-by: huiyu.eun --- diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.Rotation.cs b/src/Tizen.NUI/src/internal/Interop/Interop.Rotation.cs index 729774079..cabbacc45 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.Rotation.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.Rotation.cs @@ -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); diff --git a/src/Tizen.NUI/src/public/Common/Rotation.cs b/src/Tizen.NUI/src/public/Common/Rotation.cs index ea18ea7d1..f54870d1a 100755 --- a/src/Tizen.NUI/src/public/Common/Rotation.cs +++ b/src/Tizen.NUI/src/public/Common/Rotation.cs @@ -61,6 +61,18 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + + /// + /// The constructor of Rotation from Euler angles. + /// + /// Pitch value as Radian. + /// Yaw value as Radian + /// Roll value as Radian + [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(); + } /// /// (0.0f,0.0f,0.0f,1.0f).