SelectiveSearchSegmentationStrategyMultiple.cs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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.XimgprocModule
  8. {
  9. // C++: class SelectiveSearchSegmentationStrategyMultiple
  10. //javadoc: SelectiveSearchSegmentationStrategyMultiple
  11. public class SelectiveSearchSegmentationStrategyMultiple : SelectiveSearchSegmentationStrategy
  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. ximgproc_SelectiveSearchSegmentationStrategyMultiple_delete(nativeObj);
  22. nativeObj = IntPtr.Zero;
  23. }
  24. } finally {
  25. base.Dispose (disposing);
  26. }
  27. #else
  28. return;
  29. #endif
  30. }
  31. protected internal SelectiveSearchSegmentationStrategyMultiple (IntPtr addr) : base (addr) { }
  32. // internal usage only
  33. public static new SelectiveSearchSegmentationStrategyMultiple __fromPtr__ (IntPtr addr) { return new SelectiveSearchSegmentationStrategyMultiple (addr); }
  34. //
  35. // C++: void cv::ximgproc::segmentation::SelectiveSearchSegmentationStrategyMultiple::addStrategy(Ptr_SelectiveSearchSegmentationStrategy g, float weight)
  36. //
  37. //javadoc: SelectiveSearchSegmentationStrategyMultiple::addStrategy(g, weight)
  38. public void addStrategy (SelectiveSearchSegmentationStrategy g, float weight)
  39. {
  40. ThrowIfDisposed ();
  41. if (g != null) g.ThrowIfDisposed ();
  42. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  43. ximgproc_SelectiveSearchSegmentationStrategyMultiple_addStrategy_10(nativeObj, g.getNativeObjAddr(), weight);
  44. return;
  45. #else
  46. return;
  47. #endif
  48. }
  49. //
  50. // C++: void cv::ximgproc::segmentation::SelectiveSearchSegmentationStrategyMultiple::clearStrategies()
  51. //
  52. //javadoc: SelectiveSearchSegmentationStrategyMultiple::clearStrategies()
  53. public void clearStrategies ()
  54. {
  55. ThrowIfDisposed ();
  56. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  57. ximgproc_SelectiveSearchSegmentationStrategyMultiple_clearStrategies_10(nativeObj);
  58. return;
  59. #else
  60. return;
  61. #endif
  62. }
  63. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  64. const string LIBNAME = "__Internal";
  65. #else
  66. const string LIBNAME = "opencvforunity";
  67. #endif
  68. // C++: void cv::ximgproc::segmentation::SelectiveSearchSegmentationStrategyMultiple::addStrategy(Ptr_SelectiveSearchSegmentationStrategy g, float weight)
  69. [DllImport (LIBNAME)]
  70. private static extern void ximgproc_SelectiveSearchSegmentationStrategyMultiple_addStrategy_10 (IntPtr nativeObj, IntPtr g_nativeObj, float weight);
  71. // C++: void cv::ximgproc::segmentation::SelectiveSearchSegmentationStrategyMultiple::clearStrategies()
  72. [DllImport (LIBNAME)]
  73. private static extern void ximgproc_SelectiveSearchSegmentationStrategyMultiple_clearStrategies_10 (IntPtr nativeObj);
  74. // native support for java finalize()
  75. [DllImport (LIBNAME)]
  76. private static extern void ximgproc_SelectiveSearchSegmentationStrategyMultiple_delete (IntPtr nativeObj);
  77. }
  78. }