TrackerBoosting.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. 
  2. using OpenCVForUnity.CoreModule;
  3. using OpenCVForUnity.UtilsModule;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Runtime.InteropServices;
  7. namespace OpenCVForUnity.TrackingModule
  8. {
  9. // C++: class TrackerBoosting
  10. //javadoc: TrackerBoosting
  11. public class TrackerBoosting : Tracker
  12. {
  13. protected override void Dispose (bool disposing)
  14. {
  15. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  16. try {
  17. if (disposing) {
  18. }
  19. if (IsEnabledDispose) {
  20. if (nativeObj != IntPtr.Zero)
  21. tracking_TrackerBoosting_delete(nativeObj);
  22. nativeObj = IntPtr.Zero;
  23. }
  24. } finally {
  25. base.Dispose (disposing);
  26. }
  27. #else
  28. return;
  29. #endif
  30. }
  31. protected internal TrackerBoosting (IntPtr addr) : base (addr) { }
  32. // internal usage only
  33. public static new TrackerBoosting __fromPtr__ (IntPtr addr) { return new TrackerBoosting (addr); }
  34. //
  35. // C++: static Ptr_TrackerBoosting cv::TrackerBoosting::create()
  36. //
  37. //javadoc: TrackerBoosting::create()
  38. public static TrackerBoosting create ()
  39. {
  40. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  41. TrackerBoosting retVal = TrackerBoosting.__fromPtr__(tracking_TrackerBoosting_create_10());
  42. return retVal;
  43. #else
  44. return null;
  45. #endif
  46. }
  47. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  48. const string LIBNAME = "__Internal";
  49. #else
  50. const string LIBNAME = "opencvforunity";
  51. #endif
  52. // C++: static Ptr_TrackerBoosting cv::TrackerBoosting::create()
  53. [DllImport (LIBNAME)]
  54. private static extern IntPtr tracking_TrackerBoosting_create_10 ();
  55. // native support for java finalize()
  56. [DllImport (LIBNAME)]
  57. private static extern void tracking_TrackerBoosting_delete (IntPtr nativeObj);
  58. }
  59. }