[NUI][API10] Load bvh file
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 13 Dec 2022 12:33:30 +0000 (21:33 +0900)
committerEunki Hong <h.pichulia@gmail.com>
Wed, 25 Jan 2023 13:18:59 +0000 (22:18 +0900)
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.Model.cs
src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs

index 5226175..a8ca909 100755 (executable)
@@ -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);
         }
     }
 }
index 2ff3a0b..b51327f 100755 (executable)
@@ -201,6 +201,22 @@ namespace Tizen.NUI.Scene3D
         }
 
         /// <summary>
+        /// 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
+        /// </summary>
+        /// <returns>Animaion of bvh</returns>
+        // 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;
+        }
+
+        /// <summary>
         /// Retrieves model root Actor.
         /// </summary>
         /// <returns>Root View of the model.</returns>