Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NUI.Scene3D] Add Rotation constructor using pitch,yaw,roll #5996

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Tizen.NUI/src/internal/Interop/Interop.Rotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ internal static partial class Rotation
[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);

Expand Down
12 changes: 12 additions & 0 deletions src/Tizen.NUI/src/public/Common/Rotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ public Rotation(Vector3 v0, Vector3 v1) : this(Interop.Rotation.NewRotation2(Vec
{
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).
Expand Down
Loading