EZXRDetect2dWrapper.cs 971 B

1234567891011121314151617181920212223242526
  1. using System;
  2. using System.Runtime.InteropServices;
  3. namespace EZXR.Glass.Tracking2D
  4. {
  5. public static partial class ExternApi
  6. {
  7. #if (UNITY_IOS || UNITY_TVOS || UNITY_WEBGL) && !UNITY_EDITOR
  8. public const string LIBRARY_NAME = "__Internal";
  9. #else
  10. public const string LIBRARY_NAME = "ezglass2dtrack";
  11. #endif
  12. [DllImport(LIBRARY_NAME, CallingConvention = CallingConvention.Cdecl)]
  13. public static extern IntPtr create2dDetector(string assetpath);
  14. [DllImport(LIBRARY_NAME, CallingConvention = CallingConvention.Cdecl)]
  15. public static extern void destroy2dDetector(IntPtr detector);
  16. [DllImport(LIBRARY_NAME, CallingConvention = CallingConvention.Cdecl)]
  17. public static extern int setImage(IntPtr detector, EZXR_InputImage inputImage);
  18. [DllImport(LIBRARY_NAME, CallingConvention = CallingConvention.Cdecl)]
  19. public static extern EZXR_Detect2DResult getDetectedMarker(IntPtr detector);
  20. }
  21. }