MotionCallback.cs 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. //------------------------------------------------------------------------------
  2. // <auto-generated />
  3. //
  4. // This file was automatically generated by SWIG (http://www.swig.org).
  5. // Version 4.0.2
  6. //
  7. // Do not make changes to this file unless you know what you are doing--modify
  8. // the SWIG interface file instead.
  9. //------------------------------------------------------------------------------
  10. public class MotionCallback : global::System.IDisposable {
  11. private global::System.Runtime.InteropServices.HandleRef swigCPtr;
  12. protected bool swigCMemOwn;
  13. internal MotionCallback(global::System.IntPtr cPtr, bool cMemoryOwn) {
  14. swigCMemOwn = cMemoryOwn;
  15. swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
  16. }
  17. internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MotionCallback obj) {
  18. return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
  19. }
  20. ~MotionCallback() {
  21. Dispose(false);
  22. }
  23. public void Dispose() {
  24. Dispose(true);
  25. global::System.GC.SuppressFinalize(this);
  26. }
  27. protected virtual void Dispose(bool disposing) {
  28. lock(this) {
  29. if (swigCPtr.Handle != global::System.IntPtr.Zero) {
  30. if (swigCMemOwn) {
  31. swigCMemOwn = false;
  32. GestureEstimatePINVOKE.delete_MotionCallback(swigCPtr);
  33. }
  34. swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
  35. }
  36. }
  37. }
  38. public virtual bool onAction(ActionPoseDesc pose) {
  39. bool ret = GestureEstimatePINVOKE.MotionCallback_onAction(swigCPtr, ActionPoseDesc.getCPtr(pose));
  40. if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
  41. return ret;
  42. }
  43. public virtual bool onHandsUp(MotionCallback.Hand left_or_right) {
  44. bool ret = GestureEstimatePINVOKE.MotionCallback_onHandsUp(swigCPtr, (int)left_or_right);
  45. return ret;
  46. }
  47. public virtual bool onArmCross(float x, float y) {
  48. bool ret = GestureEstimatePINVOKE.MotionCallback_onArmCross(swigCPtr, x, y);
  49. return ret;
  50. }
  51. public virtual bool onStaticHand(HandPoseDesc left, HandPoseDesc right) {
  52. bool ret = GestureEstimatePINVOKE.MotionCallback_onStaticHand(swigCPtr, HandPoseDesc.getCPtr(left), HandPoseDesc.getCPtr(right));
  53. if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
  54. return ret;
  55. }
  56. public virtual bool onHandsUpAndFist() {
  57. bool ret = GestureEstimatePINVOKE.MotionCallback_onHandsUpAndFist(swigCPtr);
  58. return ret;
  59. }
  60. public virtual bool onTwoFingerSliding(MotionCallback.Hand left_or_right, int distance_x, int distance_y) {
  61. bool ret = GestureEstimatePINVOKE.MotionCallback_onTwoFingerSliding(swigCPtr, (int)left_or_right, distance_x, distance_y);
  62. return ret;
  63. }
  64. public virtual bool onQuiet(MotionCallback.Hand left_or_right) {
  65. bool ret = GestureEstimatePINVOKE.MotionCallback_onQuiet(swigCPtr, (int)left_or_right);
  66. return ret;
  67. }
  68. public virtual bool onPunching(MotionCallback.Hand left_or_right) {
  69. bool ret = GestureEstimatePINVOKE.MotionCallback_onPunching(swigCPtr, (int)left_or_right);
  70. return ret;
  71. }
  72. public virtual bool onFistBump() {
  73. bool ret = GestureEstimatePINVOKE.MotionCallback_onFistBump(swigCPtr);
  74. return ret;
  75. }
  76. public virtual bool onZoom(float diff) {
  77. bool ret = GestureEstimatePINVOKE.MotionCallback_onZoom(swigCPtr, diff);
  78. return ret;
  79. }
  80. public virtual bool onWaweHand(MotionCallback.Hand left_or_right) {
  81. bool ret = GestureEstimatePINVOKE.MotionCallback_onWaweHand(swigCPtr, (int)left_or_right);
  82. return ret;
  83. }
  84. public virtual bool onFlipPalm(MotionCallback.Hand left_or_right) {
  85. bool ret = GestureEstimatePINVOKE.MotionCallback_onFlipPalm(swigCPtr, (int)left_or_right);
  86. return ret;
  87. }
  88. public virtual bool onClapHands() {
  89. bool ret = GestureEstimatePINVOKE.MotionCallback_onClapHands(swigCPtr);
  90. return ret;
  91. }
  92. public virtual bool onTranslateFist(MotionCallback.Hand left_or_right) {
  93. bool ret = GestureEstimatePINVOKE.MotionCallback_onTranslateFist(swigCPtr, (int)left_or_right);
  94. return ret;
  95. }
  96. public virtual bool onLateralRaise(MotionCallback.Hand left_or_right) {
  97. bool ret = GestureEstimatePINVOKE.MotionCallback_onLateralRaise(swigCPtr, (int)left_or_right);
  98. return ret;
  99. }
  100. public virtual bool onArmDown(HandPoseDesc hand, int distance_x, int distance_y) {
  101. bool ret = GestureEstimatePINVOKE.MotionCallback_onArmDown(swigCPtr, HandPoseDesc.getCPtr(hand), distance_x, distance_y);
  102. if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
  103. return ret;
  104. }
  105. public virtual bool onCloseOpen() {
  106. bool ret = GestureEstimatePINVOKE.MotionCallback_onCloseOpen(swigCPtr);
  107. return ret;
  108. }
  109. public MotionCallback() : this(GestureEstimatePINVOKE.new_MotionCallback(), true) {
  110. }
  111. public enum Hand {
  112. LeftHand,
  113. RightHand
  114. }
  115. }