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); }
public string GetGestureName(int PlayerIndex, uint GestureIndex) { IntPtr namePtr = GestureNativeMethods.GetGestureName(PlayerIndex, GestureIndex); string Name = Marshal.PtrToStringAnsi(namePtr); return(Name); }
public void SetPlayer(int PlayerIndex, bool IsUpdate) { if (m_NativeParam.IsUsingSubThread == 0) { GestureNativeMethods.SetPlayerImmediate(PlayerIndex, IsUpdate); } else { GestureNativeMethods.SetPlayer(PlayerIndex, IsUpdate); } }
public void ResetPlayerGestureFromName(int PlayerIndex, string GestureName) { if (m_NativeParam.IsUsingSubThread == 0) { GestureNativeMethods.ResetPlayerGestureImmediateFromName(PlayerIndex, GestureName); } else { GestureNativeMethods.ResetPlayerGestureFromName(PlayerIndex, GestureName); } }
public int GetFPS() { if (m_NativeParam.IsUsingSubThread != 0) { return(GestureNativeMethods.SubThreadFPS()); } else { return((int)(1.0f / Time.unscaledDeltaTime)); } }
public void ResetPlayerGesture(int PlayerIndex, uint GestureIndex) { if (m_NativeParam.IsUsingSubThread == 0) { GestureNativeMethods.ResetPlayerGestureImmediate(PlayerIndex, GestureIndex); } else { GestureNativeMethods.ResetPlayerGesture(PlayerIndex, GestureIndex); } }
public bool GetPlayerGestureState(int PlayerIndex, IntPtr pGestureInfo, ref int InfoNum) { return(GestureNativeMethods.GetPlayerGestureState(PlayerIndex, pGestureInfo, ref InfoNum)); }
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)); }
public void UpdateSkeleton(int PlayerIndex, Point3D[] SkeletonData) { IntPtr SkeletonPtr = Marshal.UnsafeAddrOfPinnedArrayElement(SkeletonData, 0); GestureNativeMethods.UpdateSketonData(PlayerIndex, SkeletonPtr, SkeletonData.Length); }
public void OnIdle() { GestureNativeMethods.OnIdle(); }
public int GetGestureNum(int PlayerIndex) { return(GestureNativeMethods.GetGestureNum(PlayerIndex)); }
public uint GetGestureIndex(int PlayerIndex, string GestureName) { return(GestureNativeMethods.GetGestureIndex(PlayerIndex, GestureName)); }
public bool StartGestureWork() { return(GestureNativeMethods.StartGestureWork()); }
public bool LoadConfigData(string XmlFileData) { return(GestureNativeMethods.LoadConfigData(XmlFileData)); }
public bool LoadConfigFile(string XmlFilePath) { return(GestureNativeMethods.LoadConfigFile(XmlFilePath)); }
public bool GetPlayerVelocityData(int PlayerIndex, Point3D[] SkeletonVelocityInfo) { IntPtr SkeletonPtr = Marshal.UnsafeAddrOfPinnedArrayElement(SkeletonVelocityInfo, 0); return(GestureNativeMethods.GetPlayerVelocityData(PlayerIndex, SkeletonPtr, SkeletonVelocityInfo.Length)); }
public void ShutDown() { GestureNativeMethods.CloseGestureNative(); }
public void SetDebugInfo(bool bFlag) { GestureNativeMethods.SetDebugInfo(bFlag); }