123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446 |
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.PlotModule
- {
- // C++: class Plot2d
- /**
- * plot Plot function for Mat data
- */
- public class Plot2d : Algorithm
- {
- protected override void Dispose(bool disposing)
- {
- try
- {
- if (disposing)
- {
- }
- if (IsEnabledDispose)
- {
- if (nativeObj != IntPtr.Zero)
- plot_Plot2d_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- }
- finally
- {
- base.Dispose(disposing);
- }
- }
- protected internal Plot2d(IntPtr addr) : base(addr) { }
- // internal usage only
- public static new Plot2d __fromPtr__(IntPtr addr) { return new Plot2d(addr); }
- //
- // C++: void cv::plot::Plot2d::setMinX(double _plotMinX)
- //
- public void setMinX(double _plotMinX)
- {
- ThrowIfDisposed();
- plot_Plot2d_setMinX_10(nativeObj, _plotMinX);
- }
- //
- // C++: void cv::plot::Plot2d::setMinY(double _plotMinY)
- //
- public void setMinY(double _plotMinY)
- {
- ThrowIfDisposed();
- plot_Plot2d_setMinY_10(nativeObj, _plotMinY);
- }
- //
- // C++: void cv::plot::Plot2d::setMaxX(double _plotMaxX)
- //
- public void setMaxX(double _plotMaxX)
- {
- ThrowIfDisposed();
- plot_Plot2d_setMaxX_10(nativeObj, _plotMaxX);
- }
- //
- // C++: void cv::plot::Plot2d::setMaxY(double _plotMaxY)
- //
- public void setMaxY(double _plotMaxY)
- {
- ThrowIfDisposed();
- plot_Plot2d_setMaxY_10(nativeObj, _plotMaxY);
- }
- //
- // C++: void cv::plot::Plot2d::setPlotLineWidth(int _plotLineWidth)
- //
- public void setPlotLineWidth(int _plotLineWidth)
- {
- ThrowIfDisposed();
- plot_Plot2d_setPlotLineWidth_10(nativeObj, _plotLineWidth);
- }
- //
- // C++: void cv::plot::Plot2d::setNeedPlotLine(bool _needPlotLine)
- //
- /**
- * Switches data visualization mode
- *
- * param _needPlotLine if true then neighbour plot points will be connected by lines.
- * In other case data will be plotted as a set of standalone points.
- */
- public void setNeedPlotLine(bool _needPlotLine)
- {
- ThrowIfDisposed();
- plot_Plot2d_setNeedPlotLine_10(nativeObj, _needPlotLine);
- }
- //
- // C++: void cv::plot::Plot2d::setPlotLineColor(Scalar _plotLineColor)
- //
- public void setPlotLineColor(Scalar _plotLineColor)
- {
- ThrowIfDisposed();
- plot_Plot2d_setPlotLineColor_10(nativeObj, _plotLineColor.val[0], _plotLineColor.val[1], _plotLineColor.val[2], _plotLineColor.val[3]);
- }
- //
- // C++: void cv::plot::Plot2d::setPlotBackgroundColor(Scalar _plotBackgroundColor)
- //
- public void setPlotBackgroundColor(Scalar _plotBackgroundColor)
- {
- ThrowIfDisposed();
- plot_Plot2d_setPlotBackgroundColor_10(nativeObj, _plotBackgroundColor.val[0], _plotBackgroundColor.val[1], _plotBackgroundColor.val[2], _plotBackgroundColor.val[3]);
- }
- //
- // C++: void cv::plot::Plot2d::setPlotAxisColor(Scalar _plotAxisColor)
- //
- public void setPlotAxisColor(Scalar _plotAxisColor)
- {
- ThrowIfDisposed();
- plot_Plot2d_setPlotAxisColor_10(nativeObj, _plotAxisColor.val[0], _plotAxisColor.val[1], _plotAxisColor.val[2], _plotAxisColor.val[3]);
- }
- //
- // C++: void cv::plot::Plot2d::setPlotGridColor(Scalar _plotGridColor)
- //
- public void setPlotGridColor(Scalar _plotGridColor)
- {
- ThrowIfDisposed();
- plot_Plot2d_setPlotGridColor_10(nativeObj, _plotGridColor.val[0], _plotGridColor.val[1], _plotGridColor.val[2], _plotGridColor.val[3]);
- }
- //
- // C++: void cv::plot::Plot2d::setPlotTextColor(Scalar _plotTextColor)
- //
- public void setPlotTextColor(Scalar _plotTextColor)
- {
- ThrowIfDisposed();
- plot_Plot2d_setPlotTextColor_10(nativeObj, _plotTextColor.val[0], _plotTextColor.val[1], _plotTextColor.val[2], _plotTextColor.val[3]);
- }
- //
- // C++: void cv::plot::Plot2d::setPlotSize(int _plotSizeWidth, int _plotSizeHeight)
- //
- public void setPlotSize(int _plotSizeWidth, int _plotSizeHeight)
- {
- ThrowIfDisposed();
- plot_Plot2d_setPlotSize_10(nativeObj, _plotSizeWidth, _plotSizeHeight);
- }
- //
- // C++: void cv::plot::Plot2d::setShowGrid(bool needShowGrid)
- //
- public void setShowGrid(bool needShowGrid)
- {
- ThrowIfDisposed();
- plot_Plot2d_setShowGrid_10(nativeObj, needShowGrid);
- }
- //
- // C++: void cv::plot::Plot2d::setShowText(bool needShowText)
- //
- public void setShowText(bool needShowText)
- {
- ThrowIfDisposed();
- plot_Plot2d_setShowText_10(nativeObj, needShowText);
- }
- //
- // C++: void cv::plot::Plot2d::setGridLinesNumber(int gridLinesNumber)
- //
- public void setGridLinesNumber(int gridLinesNumber)
- {
- ThrowIfDisposed();
- plot_Plot2d_setGridLinesNumber_10(nativeObj, gridLinesNumber);
- }
- //
- // C++: void cv::plot::Plot2d::setInvertOrientation(bool _invertOrientation)
- //
- public void setInvertOrientation(bool _invertOrientation)
- {
- ThrowIfDisposed();
- plot_Plot2d_setInvertOrientation_10(nativeObj, _invertOrientation);
- }
- //
- // C++: void cv::plot::Plot2d::setPointIdxToPrint(int pointIdx)
- //
- /**
- * Sets the index of a point which coordinates will be printed on the top left corner of the plot (if ShowText flag is true).
- *
- * param pointIdx index of the required point in data array.
- */
- public void setPointIdxToPrint(int pointIdx)
- {
- ThrowIfDisposed();
- plot_Plot2d_setPointIdxToPrint_10(nativeObj, pointIdx);
- }
- //
- // C++: void cv::plot::Plot2d::render(Mat& _plotResult)
- //
- public void render(Mat _plotResult)
- {
- ThrowIfDisposed();
- if (_plotResult != null) _plotResult.ThrowIfDisposed();
- plot_Plot2d_render_10(nativeObj, _plotResult.nativeObj);
- }
- //
- // C++: static Ptr_Plot2d cv::plot::Plot2d::create(Mat data)
- //
- /**
- * Creates Plot2d object
- *
- * param data \(1xN\) or \(Nx1\) matrix containing \(Y\) values of points to plot. \(X\) values
- * will be equal to indexes of correspondind elements in data matrix.
- * return automatically generated
- */
- public static Plot2d create(Mat data)
- {
- if (data != null) data.ThrowIfDisposed();
- return Plot2d.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(plot_Plot2d_create_10(data.nativeObj)));
- }
- //
- // C++: static Ptr_Plot2d cv::plot::Plot2d::create(Mat dataX, Mat dataY)
- //
- /**
- * Creates Plot2d object
- *
- * param dataX \(1xN\) or \(Nx1\) matrix \(X\) values of points to plot.
- * param dataY \(1xN\) or \(Nx1\) matrix containing \(Y\) values of points to plot.
- * return automatically generated
- */
- public static Plot2d create(Mat dataX, Mat dataY)
- {
- if (dataX != null) dataX.ThrowIfDisposed();
- if (dataY != null) dataY.ThrowIfDisposed();
- return Plot2d.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(plot_Plot2d_create_11(dataX.nativeObj, dataY.nativeObj)));
- }
- #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
- const string LIBNAME = "__Internal";
- #else
- const string LIBNAME = "opencvforunity";
- #endif
- // C++: void cv::plot::Plot2d::setMinX(double _plotMinX)
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_setMinX_10(IntPtr nativeObj, double _plotMinX);
- // C++: void cv::plot::Plot2d::setMinY(double _plotMinY)
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_setMinY_10(IntPtr nativeObj, double _plotMinY);
- // C++: void cv::plot::Plot2d::setMaxX(double _plotMaxX)
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_setMaxX_10(IntPtr nativeObj, double _plotMaxX);
- // C++: void cv::plot::Plot2d::setMaxY(double _plotMaxY)
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_setMaxY_10(IntPtr nativeObj, double _plotMaxY);
- // C++: void cv::plot::Plot2d::setPlotLineWidth(int _plotLineWidth)
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_setPlotLineWidth_10(IntPtr nativeObj, int _plotLineWidth);
- // C++: void cv::plot::Plot2d::setNeedPlotLine(bool _needPlotLine)
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_setNeedPlotLine_10(IntPtr nativeObj, [MarshalAs(UnmanagedType.U1)] bool _needPlotLine);
- // C++: void cv::plot::Plot2d::setPlotLineColor(Scalar _plotLineColor)
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_setPlotLineColor_10(IntPtr nativeObj, double _plotLineColor_val0, double _plotLineColor_val1, double _plotLineColor_val2, double _plotLineColor_val3);
- // C++: void cv::plot::Plot2d::setPlotBackgroundColor(Scalar _plotBackgroundColor)
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_setPlotBackgroundColor_10(IntPtr nativeObj, double _plotBackgroundColor_val0, double _plotBackgroundColor_val1, double _plotBackgroundColor_val2, double _plotBackgroundColor_val3);
- // C++: void cv::plot::Plot2d::setPlotAxisColor(Scalar _plotAxisColor)
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_setPlotAxisColor_10(IntPtr nativeObj, double _plotAxisColor_val0, double _plotAxisColor_val1, double _plotAxisColor_val2, double _plotAxisColor_val3);
- // C++: void cv::plot::Plot2d::setPlotGridColor(Scalar _plotGridColor)
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_setPlotGridColor_10(IntPtr nativeObj, double _plotGridColor_val0, double _plotGridColor_val1, double _plotGridColor_val2, double _plotGridColor_val3);
- // C++: void cv::plot::Plot2d::setPlotTextColor(Scalar _plotTextColor)
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_setPlotTextColor_10(IntPtr nativeObj, double _plotTextColor_val0, double _plotTextColor_val1, double _plotTextColor_val2, double _plotTextColor_val3);
- // C++: void cv::plot::Plot2d::setPlotSize(int _plotSizeWidth, int _plotSizeHeight)
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_setPlotSize_10(IntPtr nativeObj, int _plotSizeWidth, int _plotSizeHeight);
- // C++: void cv::plot::Plot2d::setShowGrid(bool needShowGrid)
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_setShowGrid_10(IntPtr nativeObj, [MarshalAs(UnmanagedType.U1)] bool needShowGrid);
- // C++: void cv::plot::Plot2d::setShowText(bool needShowText)
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_setShowText_10(IntPtr nativeObj, [MarshalAs(UnmanagedType.U1)] bool needShowText);
- // C++: void cv::plot::Plot2d::setGridLinesNumber(int gridLinesNumber)
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_setGridLinesNumber_10(IntPtr nativeObj, int gridLinesNumber);
- // C++: void cv::plot::Plot2d::setInvertOrientation(bool _invertOrientation)
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_setInvertOrientation_10(IntPtr nativeObj, [MarshalAs(UnmanagedType.U1)] bool _invertOrientation);
- // C++: void cv::plot::Plot2d::setPointIdxToPrint(int pointIdx)
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_setPointIdxToPrint_10(IntPtr nativeObj, int pointIdx);
- // C++: void cv::plot::Plot2d::render(Mat& _plotResult)
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_render_10(IntPtr nativeObj, IntPtr _plotResult_nativeObj);
- // C++: static Ptr_Plot2d cv::plot::Plot2d::create(Mat data)
- [DllImport(LIBNAME)]
- private static extern IntPtr plot_Plot2d_create_10(IntPtr data_nativeObj);
- // C++: static Ptr_Plot2d cv::plot::Plot2d::create(Mat dataX, Mat dataY)
- [DllImport(LIBNAME)]
- private static extern IntPtr plot_Plot2d_create_11(IntPtr dataX_nativeObj, IntPtr dataY_nativeObj);
- // native support for java finalize()
- [DllImport(LIBNAME)]
- private static extern void plot_Plot2d_delete(IntPtr nativeObj);
- }
- }
|