GestureBean.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using UnityEngine;
  2. namespace Rokid.UXR.Interaction
  3. {
  4. [System.Serializable]
  5. public class GestureBean
  6. {
  7. /// <summary>
  8. /// Gesture type
  9. /// </summary>
  10. public int gesture_type;
  11. /// <summary>
  12. /// Hand type
  13. /// </summary>
  14. public int hand_type;
  15. /// <summary>
  16. /// Hand Orientation
  17. /// </summary>
  18. public int hand_orientation;
  19. /// <summary>
  20. /// Skeleton Pos
  21. /// </summary>
  22. public Vector3[] skeletons;
  23. /// <summary>
  24. /// Skeleton Rot
  25. /// </summary>
  26. public Quaternion[] skeletonsRot;
  27. /// <summary>
  28. /// Hand Root Axis
  29. /// </summary>
  30. public Vector3[] axis;
  31. /// <summary>
  32. /// Hand Root Rotation
  33. /// </summary>
  34. public Quaternion rotation;
  35. /// <summary>
  36. /// Hand root positoin
  37. /// </summary>
  38. public Vector3 position;
  39. public string ThreeGesKeyInfo()
  40. {
  41. return $"\n handPose:{position},{rotation.eulerAngles}\n wristPose:{skeletons?[0]},{skeletonsRot?[0].eulerAngles} \n handType: {(HandType)hand_type} \n gestureType: {(GestureType)gesture_type} \n handOrientation:{hand_orientation} \n skeletons.Count:{skeletons?.Length}";
  42. }
  43. }
  44. }