8 using System.Runtime.InteropServices;
49 private float[] glPoseMatrix =
new float[16];
77 JITTER_REDUCTION_ACTIVATION = 8,
82 JITTER_REDUCTION_DEACTIVATION = 16
114 if (Application.platform == RuntimePlatform.IPhonePlayer)
127 if (Application.platform == RuntimePlatform.IPhonePlayer)
140 if (Application.platform == RuntimePlatform.IPhonePlayer)
153 public void AddTrackerData(
string trackingFileName,
bool isAndroidAssetFile =
false)
155 if (Application.platform == RuntimePlatform.IPhonePlayer)
157 NativeStaticAPI.TrackerManager_addTrackerData(trackingFileName, isAndroidAssetFile);
161 NativeSharedAPI.TrackerManager_addTrackerData(trackingFileName, isAndroidAssetFile);
170 if (Application.platform == RuntimePlatform.IPhonePlayer)
183 if (Application.platform == RuntimePlatform.IPhonePlayer)
196 if (Application.platform == RuntimePlatform.IPhonePlayer)
215 if (Application.platform == RuntimePlatform.IPhonePlayer)
231 ulong trackingStateCPtr = 0;
233 if (Application.platform == RuntimePlatform.IPhonePlayer)
235 trackingStateCPtr =
NativeStaticAPI.TrackerManager_updateTrackingState();
239 trackingStateCPtr =
NativeSharedAPI.TrackerManager_updateTrackingState();
242 trackingState.SetTrackingStateCPtr(trackingStateCPtr);
243 return trackingState;
252 return trackingState;
294 float[] s =
new float[2];
295 float[] w =
new float[3];
298 s[1] = Screen.height - screen.y;
300 if (Application.platform == RuntimePlatform.IPhonePlayer)
302 NativeStaticAPI.TrackerManager_getWorldPositionFromScreenCoordinate(s, w);
306 NativeSharedAPI.TrackerManager_getWorldPositionFromScreenCoordinate(s, w);
310 Vector3 world =
new Vector3(w[0], w[2], w[1]);
312 switch (Screen.orientation)
314 case ScreenOrientation.Portrait:
318 case ScreenOrientation.PortraitUpsideDown:
322 case ScreenOrientation.Landscape:
326 case ScreenOrientation.LandscapeRight:
436 if (Application.platform == RuntimePlatform.IPhonePlayer)
449 if (Application.platform == RuntimePlatform.IPhonePlayer)
480 if (guideInfo == null)
485 guideInfo.UpdateGuideInfo();
495 ulong SurfaceThumbnail_cPtr = 0;
496 if (Application.platform == RuntimePlatform.IPhonePlayer)
498 SurfaceThumbnail_cPtr =
NativeStaticAPI.TrackerManager_saveSurfaceData(outputFileName);
502 SurfaceThumbnail_cPtr =
NativeSharedAPI.TrackerManager_saveSurfaceData(outputFileName);
505 if (SurfaceThumbnail_cPtr == 0)
514 return surfaceThumbnail;
WorldCenterMode
The world center mode defines what is the center in game view. If camera is world center then trackab...
void FindSurface()
Start SLAM learning.
void StopTracker()
Stop Tracker.
const int TRACKER_TYPE_OBJECT
Object Tracker(Object data should be created via SLAM tracker)
void RemoveTrackerData(string trackingFileName="")
Delete the Trackable data from the Map List.
Container for individual tracking information
Initialize system environment with app key, screen size and orientation
SurfaceThumbnail SaveSurfaceData(string outputFileName)
Saves SLAM learning results.
Vector3 GetWorldPositionFromScreenCoordinate(Vector2 screen)
Gets the x, y, 0 coordinates on the world coordinate corresponding to x, y in the Screen coordinate...
const int TRACKER_TYPE_SLAM
Visual slam tracker (Can create surface data and save it)
const int TRACKER_TYPE_CODE_SCANNER
Code scanner
void SetTrackingOption(TrackingOption trackingOption)
Change Image Tracke Mode.
const int TRACKER_TYPE_IMAGE
Planar image Tracker
const int TRACKER_TYPE_INSTANT
Instant Tracker
TrackingState GetTrackingState()
Get saved TrackingState value
void QuitFindingSurface()
SLAM stops learning.
Contains surface thumbnail image information of first keyframe
Contains surface's data generated from slam tracking
void StartTracker(int trackerType)
Start Tracker.
void SetWorldCenterMode(WorldCenterMode worldCenterMode)
Set world center mode
void DestroyTracker()
Destroy Tracker.
TrackingState UpdateTrackingState()
Upate tracking state. This function should be called before GetTrackingResult
void LoadTrackerData()
Load the Trackable data.
bool IsTrackerDataLoadCompleted()
Check that the Trackable data loading is finished.
TrackingOption
Additional tracking option (Image tracker only) 1 : Normal Tracking 2 : Extended Tracking 4 : Multi T...
const int TRACKER_TYPE_MARKER
Marker Tracker
GuideInfo GetGuideInfo()
Get guide information of the found surface on SLAM after the FindSurface method has been called ...
static TrackerManager GetInstance()
Get TrackerManager instance
void AddTrackerData(string trackingFileName, bool isAndroidAssetFile=false)
Add the Trackable data to the Map List.
Control AR Engine (Singletone)