GestureDetector.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 GestureDetector : global::System.IDisposable {
  11. private global::System.Runtime.InteropServices.HandleRef swigCPtr;
  12. protected bool swigCMemOwn;
  13. internal GestureDetector(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(GestureDetector obj) {
  18. return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
  19. }
  20. ~GestureDetector() {
  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_GestureDetector(swigCPtr);
  33. }
  34. swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
  35. }
  36. }
  37. }
  38. public GestureDetector() : this(GestureEstimatePINVOKE.new_GestureDetector__SWIG_0(), true) {
  39. }
  40. public GestureDetector(SWIGTYPE_p_std__shared_ptrT_zwn__gesture__MotionCallback_t callback) : this(GestureEstimatePINVOKE.new_GestureDetector__SWIG_1(SWIGTYPE_p_std__shared_ptrT_zwn__gesture__MotionCallback_t.getCPtr(callback)), true) {
  41. if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
  42. }
  43. public void Detect(LandmarkSet kpts) {
  44. GestureEstimatePINVOKE.GestureDetector_Detect(swigCPtr, LandmarkSet.getCPtr(kpts));
  45. if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
  46. }
  47. public void set_model_path(string model_dir) {
  48. GestureEstimatePINVOKE.GestureDetector_set_model_path(swigCPtr, model_dir);
  49. if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
  50. }
  51. public void Reset() {
  52. GestureEstimatePINVOKE.GestureDetector_Reset(swigCPtr);
  53. }
  54. public void set_callback(SWIGTYPE_p_std__shared_ptrT_zwn__gesture__MotionCallback_t callback) {
  55. GestureEstimatePINVOKE.GestureDetector_set_callback(swigCPtr, SWIGTYPE_p_std__shared_ptrT_zwn__gesture__MotionCallback_t.getCPtr(callback));
  56. if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
  57. }
  58. }