7 using System.Runtime.InteropServices;
22 #region -- System setting 24 public static extern void init(
string appKey);
27 #region -- MaxstAR setting 32 public static extern void onSurfaceChanged(
int surfaceWidth,
int surfaceHeight);
35 public static extern void setScreenOrientation(
int orientation);
41 #region -- Camera device setting 43 public static extern int CameraDevice_start(
int cameraId,
int preferredWidth,
int preferredHeight);
46 public static extern void CameraDevice_stop();
49 public static extern bool CameraDevice_setFocusMode(
int focusMode);
52 public static extern bool CameraDevice_setFlashLightMode(
bool toggle);
55 public static extern bool CameraDevice_setAutoWhiteBalanceLock(
bool toggle);
58 public static extern bool CameraDevice_flipVideo(
int direction,
bool toggle);
61 public static extern int CameraDevice_getParamList();
64 public static extern int CameraDevice_Param_getKeyLength(
int index);
67 public static extern void CameraDevice_Param_getKey(
int index, byte[] key);
70 public static extern bool CameraDevice_setBoolTypeParameter(
string key,
bool boolValue);
73 public static extern bool CameraDevice_setIntTypeParameter(
string key,
int intValue);
76 public static extern bool CameraDevice_setRangeTypeParameter(
string key,
int min,
int max);
79 public static extern bool CameraDevice_setStringTypeParameter(
string key,
string stringValue);
82 public static extern int CameraDevice_getWidth();
85 public static extern int CameraDevice_getHeight();
88 public static extern void CameraDevice_getProjectionMatrix(
float[] matrix);
91 #region -- Background renderer setting 108 #region -- TrackerManager settings 110 public static extern void TrackerManager_startTracker(
int trackerMask);
113 public static extern void TrackerManager_stopTracker();
116 public static extern void TrackerManager_destroyTracker();
119 public static extern void TrackerManager_addTrackerData(
string trackingFileName,
bool isAndroidAssetFile =
false);
122 public static extern void TrackerManager_removeTrackerData(
string trackingFileName =
"");
125 public static extern void TrackerManager_loadTrackerData();
128 public static extern void TrackerManager_setTrackingOption(
int option);
131 public static extern bool TrackerManager_isTrackerDataLoadCompleted();
134 public static extern ulong TrackerManager_updateTrackingState();
137 public static extern void TrackerManager_findSurface();
140 public static extern void TrackerManager_quitFindingSurface();
146 public static extern ulong TrackerManager_getGuideInfo();
149 public static extern ulong TrackerManager_saveSurfaceData(
string outputFileName);
158 public static extern void TrackerManager_getWorldPositionFromScreenCoordinate(
float[] screen,
float[] world);
173 #region -- TrackingResult 175 public static extern int TrackingResult_getCount(ulong TrackingResult_cPtr);
178 public static extern ulong TrackingResult_getTrackable(ulong TrackingResult_cPtr,
int index);
183 public static extern void Trackable_getId(ulong Trackable_cPtr, byte[]
id);
186 public static extern void Trackable_getName(ulong Trackable_cPtr, byte[] name);
192 public static extern void Trackable_getPose(ulong Trackable_cPtr,
float[] pose);
201 #region -- TrackingState 203 public static extern ulong TrackingState_getTrackingResult(ulong TrackingState_cPtr);
206 public static extern ulong TrackingState_getImage(ulong TrackingState_cPtr);
209 public static extern int TrackingState_getCodeScanResultLength(ulong TrackingState_cPtr);
212 public static extern void TrackingState_getCodeScanResult(ulong TrackingState_cPtr, byte[] result,
int length);
215 #region -- Guide Info 217 public static extern float GuideInfo_getInitializingProgress(ulong GuideInfo_cPtr);
220 public static extern int GuideInfo_getKeyframeCount(ulong GuideInfo_cPtr);
223 public static extern int GuideInfo_getFeatureCount(ulong GuideInfo_cPtr);
226 public static extern void GuideInfo_getFeatureBuffer(ulong GuideInfo_cPtr,
float[] data,
int length);
229 #region -- SurfaceMesh 246 #region -- SurfaceThumbnail 248 public static extern int SurfaceThumbnail_getWidth(ulong SurfaceThumbnail_cPtr);
251 public static extern int SurfaceThumbnail_getHeight(ulong SurfaceThumbnail_cPtr);
254 public static extern int SurfaceThumbnail_getLength(ulong SurfaceThumbnail_cPtr);
257 public static extern int SurfaceThumbnail_getBpp(ulong SurfaceThumbnail_cPtr);
260 public static extern int SurfaceThumbnail_getData(ulong SurfaceThumbnail_cPtr, byte[] data,
int length);
263 #region -- SensorDevice 265 public static extern void startSensor();
268 public static extern void stopSensor();
282 public static extern bool MapViewer_initialize(
string fileName);
285 public static extern void MapViewer_deInitialize();
288 public static extern IntPtr MapViewer_getJson();
291 public static extern int MapViewer_create(
int idx);
294 public static extern void MapViewer_getIndices(out
int indices);
297 public static extern void MapViewer_getTexCoords(out
float texCoords);
300 public static extern int MapViewer_getImageSize(
int idx);
303 public static extern void MapViewer_getImage(
int idx, out byte image);
306 #region -- Wearable Calibration 308 public static extern bool WearableCalibration_isActivated();
311 public static extern bool WearableCalibration_init(
string modelName);
314 public static extern void WearableCalibration_deinit();
317 public static extern void WearableCalibration_setSurfaceSize(
int width,
int height);
320 public static extern void WearableCalibration_getProjectionMatrix(
float[] projection,
int eyeType);
323 #region -- Image Extractor 325 public static extern int TrackedImage_getWidth(ulong Image_cPtr);
328 public static extern int TrackedImage_getHeight(ulong Image_cPtr);
331 public static extern int TrackedImage_getLength(ulong Image_cPtr);
334 public static extern int TrackedImage_getFormat(ulong Image_cPtr);
337 public static extern void TrackedImage_getData(ulong Image_cPtr, byte[] buffer,
int size);
340 public static extern ulong TrackedImage_getDataPtr(ulong Image_cPtr,
int size);