123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262 |
-
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.MlModule
- {
- // C++: class ParamGrid
- //javadoc: ParamGrid
- public class ParamGrid : DisposableOpenCVObject
- {
- protected override void Dispose (bool disposing)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- try {
- if (disposing) {
- }
- if (IsEnabledDispose) {
- if (nativeObj != IntPtr.Zero)
- ml_ParamGrid_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- } finally {
- base.Dispose (disposing);
- }
- #else
- return;
- #endif
- }
- protected internal ParamGrid (IntPtr addr) : base (addr) { }
- public IntPtr getNativeObjAddr () { return nativeObj; }
- // internal usage only
- public static ParamGrid __fromPtr__ (IntPtr addr) { return new ParamGrid (addr); }
- //
- // C++: static Ptr_ParamGrid cv::ml::ParamGrid::create(double minVal = 0., double maxVal = 0., double logstep = 1.)
- //
- //javadoc: ParamGrid::create(minVal, maxVal, logstep)
- public static ParamGrid create (double minVal, double maxVal, double logstep)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- ParamGrid retVal = ParamGrid.__fromPtr__(ml_ParamGrid_create_10(minVal, maxVal, logstep));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: ParamGrid::create(minVal, maxVal)
- public static ParamGrid create (double minVal, double maxVal)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- ParamGrid retVal = ParamGrid.__fromPtr__(ml_ParamGrid_create_11(minVal, maxVal));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: ParamGrid::create(minVal)
- public static ParamGrid create (double minVal)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- ParamGrid retVal = ParamGrid.__fromPtr__(ml_ParamGrid_create_12(minVal));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: ParamGrid::create()
- public static ParamGrid create ()
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- ParamGrid retVal = ParamGrid.__fromPtr__(ml_ParamGrid_create_13());
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: double ParamGrid::minVal
- //
- //javadoc: ParamGrid::get_minVal()
- public double get_minVal ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- double retVal = ml_ParamGrid_get_1minVal_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: void ParamGrid::minVal
- //
- //javadoc: ParamGrid::set_minVal(minVal)
- public void set_minVal (double minVal)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- ml_ParamGrid_set_1minVal_10(nativeObj, minVal);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: double ParamGrid::maxVal
- //
- //javadoc: ParamGrid::get_maxVal()
- public double get_maxVal ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- double retVal = ml_ParamGrid_get_1maxVal_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: void ParamGrid::maxVal
- //
- //javadoc: ParamGrid::set_maxVal(maxVal)
- public void set_maxVal (double maxVal)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- ml_ParamGrid_set_1maxVal_10(nativeObj, maxVal);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: double ParamGrid::logStep
- //
- //javadoc: ParamGrid::get_logStep()
- public double get_logStep ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- double retVal = ml_ParamGrid_get_1logStep_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: void ParamGrid::logStep
- //
- //javadoc: ParamGrid::set_logStep(logStep)
- public void set_logStep (double logStep)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- ml_ParamGrid_set_1logStep_10(nativeObj, logStep);
-
- return;
- #else
- return;
- #endif
- }
- #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
- const string LIBNAME = "__Internal";
- #else
- const string LIBNAME = "opencvforunity";
- #endif
- // C++: static Ptr_ParamGrid cv::ml::ParamGrid::create(double minVal = 0., double maxVal = 0., double logstep = 1.)
- [DllImport (LIBNAME)]
- private static extern IntPtr ml_ParamGrid_create_10 (double minVal, double maxVal, double logstep);
- [DllImport (LIBNAME)]
- private static extern IntPtr ml_ParamGrid_create_11 (double minVal, double maxVal);
- [DllImport (LIBNAME)]
- private static extern IntPtr ml_ParamGrid_create_12 (double minVal);
- [DllImport (LIBNAME)]
- private static extern IntPtr ml_ParamGrid_create_13 ();
- // C++: double ParamGrid::minVal
- [DllImport (LIBNAME)]
- private static extern double ml_ParamGrid_get_1minVal_10 (IntPtr nativeObj);
- // C++: void ParamGrid::minVal
- [DllImport (LIBNAME)]
- private static extern void ml_ParamGrid_set_1minVal_10 (IntPtr nativeObj, double minVal);
- // C++: double ParamGrid::maxVal
- [DllImport (LIBNAME)]
- private static extern double ml_ParamGrid_get_1maxVal_10 (IntPtr nativeObj);
- // C++: void ParamGrid::maxVal
- [DllImport (LIBNAME)]
- private static extern void ml_ParamGrid_set_1maxVal_10 (IntPtr nativeObj, double maxVal);
- // C++: double ParamGrid::logStep
- [DllImport (LIBNAME)]
- private static extern double ml_ParamGrid_get_1logStep_10 (IntPtr nativeObj);
- // C++: void ParamGrid::logStep
- [DllImport (LIBNAME)]
- private static extern void ml_ParamGrid_set_1logStep_10 (IntPtr nativeObj, double logStep);
- // native support for java finalize()
- [DllImport (LIBNAME)]
- private static extern void ml_ParamGrid_delete (IntPtr nativeObj);
- }
- }
|