Esempio n. 1
0
        public void Init(GestureConfigParams Param)
        {
            m_NativeParam = new NativeGestureConfigParam();

            m_NativeParam.IsUsingSubThread = Convert.ToInt32(Param.IsUsingSubThread);

            m_NativeParam.ReturnInfoType = (int)Param.GestureReturnInfoType;

            m_NativeParam.PlayerNum = Param.PlayerNum;

            m_NativeParam.SkeletonVelocityFrames = Param.SkeletonVelocityFrames;

            m_NativeParam.SkeletonVelocityMulType = (int)Param.SkeletonVelocityMulType;

            m_NativeParam.SkeletonNum = OrbbecWrapper.availableJoints.Length;

            SkeletonIndexs = new int[m_NativeParam.SkeletonNum];
            for (int i = 0; i < SkeletonIndexs.Length; ++i)
            {
                SkeletonIndexs[i] = (int)OrbbecWrapper.availableJoints[i];
            }

            m_NativeParam.SkeletonTypeArray = Marshal.UnsafeAddrOfPinnedArrayElement(SkeletonIndexs, 0);

            m_NativeParam.IsGetVelocityData = Convert.ToInt32(Param.IsGetVelocityData);

            GestureNativeMethods.InitGestureNative(m_NativeParam);
        }
Esempio n. 2
0
        public string GetGestureName(int PlayerIndex, uint GestureIndex)
        {
            IntPtr namePtr = GestureNativeMethods.GetGestureName(PlayerIndex, GestureIndex);

            string Name = Marshal.PtrToStringAnsi(namePtr);

            return(Name);
        }
Esempio n. 3
0
 public void SetPlayer(int PlayerIndex, bool IsUpdate)
 {
     if (m_NativeParam.IsUsingSubThread == 0)
     {
         GestureNativeMethods.SetPlayerImmediate(PlayerIndex, IsUpdate);
     }
     else
     {
         GestureNativeMethods.SetPlayer(PlayerIndex, IsUpdate);
     }
 }
Esempio n. 4
0
 public void ResetPlayerGestureFromName(int PlayerIndex, string GestureName)
 {
     if (m_NativeParam.IsUsingSubThread == 0)
     {
         GestureNativeMethods.ResetPlayerGestureImmediateFromName(PlayerIndex, GestureName);
     }
     else
     {
         GestureNativeMethods.ResetPlayerGestureFromName(PlayerIndex, GestureName);
     }
 }
Esempio n. 5
0
 public int GetFPS()
 {
     if (m_NativeParam.IsUsingSubThread != 0)
     {
         return(GestureNativeMethods.SubThreadFPS());
     }
     else
     {
         return((int)(1.0f / Time.unscaledDeltaTime));
     }
 }
Esempio n. 6
0
 public void ResetPlayerGesture(int PlayerIndex, uint GestureIndex)
 {
     if (m_NativeParam.IsUsingSubThread == 0)
     {
         GestureNativeMethods.ResetPlayerGestureImmediate(PlayerIndex, GestureIndex);
     }
     else
     {
         GestureNativeMethods.ResetPlayerGesture(PlayerIndex, GestureIndex);
     }
 }
Esempio n. 7
0
 public bool GetPlayerGestureState(int PlayerIndex, IntPtr pGestureInfo, ref int InfoNum)
 {
     return(GestureNativeMethods.GetPlayerGestureState(PlayerIndex, pGestureInfo, ref InfoNum));
 }
Esempio n. 8
0
        public bool UpdateSkeletonImmediate(int PlayerIndex, Point3D[] SkeletonData, IntPtr pGestureInfo, ref int InfoNum)
        {
            IntPtr SkeletonPtr = Marshal.UnsafeAddrOfPinnedArrayElement(SkeletonData, 0);

            return(GestureNativeMethods.UpdateSketonDataImmediate(PlayerIndex, SkeletonPtr, SkeletonData.Length, pGestureInfo, ref InfoNum));
        }
Esempio n. 9
0
        public void UpdateSkeleton(int PlayerIndex, Point3D[] SkeletonData)
        {
            IntPtr SkeletonPtr = Marshal.UnsafeAddrOfPinnedArrayElement(SkeletonData, 0);

            GestureNativeMethods.UpdateSketonData(PlayerIndex, SkeletonPtr, SkeletonData.Length);
        }
Esempio n. 10
0
 public void OnIdle()
 {
     GestureNativeMethods.OnIdle();
 }
Esempio n. 11
0
 public int GetGestureNum(int PlayerIndex)
 {
     return(GestureNativeMethods.GetGestureNum(PlayerIndex));
 }
Esempio n. 12
0
 public uint GetGestureIndex(int PlayerIndex, string GestureName)
 {
     return(GestureNativeMethods.GetGestureIndex(PlayerIndex, GestureName));
 }
Esempio n. 13
0
 public bool StartGestureWork()
 {
     return(GestureNativeMethods.StartGestureWork());
 }
Esempio n. 14
0
 public bool LoadConfigData(string XmlFileData)
 {
     return(GestureNativeMethods.LoadConfigData(XmlFileData));
 }
Esempio n. 15
0
 public bool LoadConfigFile(string XmlFilePath)
 {
     return(GestureNativeMethods.LoadConfigFile(XmlFilePath));
 }
Esempio n. 16
0
        public bool GetPlayerVelocityData(int PlayerIndex, Point3D[] SkeletonVelocityInfo)
        {
            IntPtr SkeletonPtr = Marshal.UnsafeAddrOfPinnedArrayElement(SkeletonVelocityInfo, 0);

            return(GestureNativeMethods.GetPlayerVelocityData(PlayerIndex, SkeletonPtr, SkeletonVelocityInfo.Length));
        }
Esempio n. 17
0
 public void ShutDown()
 {
     GestureNativeMethods.CloseGestureNative();
 }
Esempio n. 18
0
 public void SetDebugInfo(bool bFlag)
 {
     GestureNativeMethods.SetDebugInfo(bFlag);
 }