From 563df1b6367c2ad466e3c54392606ad76c796904 Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Tue, 13 Dec 2022 21:33:30 +0900 Subject: [PATCH] [NUI][API10] Load bvh file Signed-off-by: Eunki, Hong --- .../src/internal/Interop/Interop.Model.cs | 3 +++ src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.Model.cs b/src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.Model.cs index 5226175..a8ca909 100755 --- a/src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.Model.cs +++ b/src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.Model.cs @@ -66,6 +66,9 @@ namespace Tizen.NUI.Scene3D [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_Model_GetAnimation_2")] public static extern global::System.IntPtr GetAnimation(global::System.Runtime.InteropServices.HandleRef model, string name); + + [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_Model_LoadBvhAnimation_1")] + public static extern global::System.IntPtr LoadBvhAnimation(global::System.Runtime.InteropServices.HandleRef model, string bvhFilename, global::System.Runtime.InteropServices.HandleRef scale); } } } diff --git a/src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs b/src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs index 2ff3a0b..b51327f 100755 --- a/src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs +++ b/src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs @@ -201,6 +201,22 @@ namespace Tizen.NUI.Scene3D } /// + /// Load bvh animation and assign to model. + /// Scale is additional scale factor of bvh animation. It is possible that + /// Model's scale may not matched with bvh animation scale. + /// If scale is null, default use as Vector3.ONE + /// + /// Animaion of bvh + // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API) + [EditorBrowsable(EditorBrowsableState.Never)] + public Animation LoadBvhAnimation(string bvhFilename, Vector3 scale = null) + { + Animation ret = new Animation(Interop.Model.LoadBvhAnimation(SwigCPtr, bvhFilename, Vector3.getCPtr(scale)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// /// Retrieves model root Actor. /// /// Root View of the model. -- 2.7.4