TrackerManager class controls trackers provided by MAXST AR.
◆ addTrackerData()
void com.maxst.ar.TrackerManager.addTrackerData |
( |
String |
trackingFileName, |
|
|
boolean |
isAndroidAssetFile |
|
) |
| |
Add a map file to the candidate list for Image Tracker, Object Tracker, Image Fusion Tracker and Object Fusion Tracker.
After adding some map files, loadTrackerData should be called.
- Parameters
-
trackingFileName | absolute file path if the map file is located in sdcard, or a relative file name path if the map file is located in assets folder. |
isAndroidAssetFile | flag to notify whether the map file is located in assets folder. |
◆ destroyTracker()
void com.maxst.ar.TrackerManager.destroyTracker |
( |
| ) |
|
Destroy a tracker. Remove all tracking data including map data and tracking results.
◆ findSurface()
void com.maxst.ar.TrackerManager.findSurface |
( |
| ) |
|
Start to find the groud plane visible through the camera. It works only on Instant Tracker.
◆ getFusionTrackingState()
int com.maxst.ar.TrackerManager.getFusionTrackingState |
( |
| ) |
|
Get the status of the AR fusion tracker working on the current app.
- Returns
- 1 if the tracking status is successful, otherwise -1.
◆ getGuideInformation()
GuideInfo com.maxst.ar.TrackerManager.getGuideInformation |
( |
| ) |
|
Get the guide information such as feature points, a bounding box and anchors concerning Object Tracker.
It works only on Object Tracker.
- Returns
- GuideInfo instance
◆ getInstance()
◆ getWorldPositionFromScreenCoordinate()
void com.maxst.ar.TrackerManager.getWorldPositionFromScreenCoordinate |
( |
float[] |
screenCoord, |
|
|
float[] |
worldPos |
|
) |
| |
Get 3d world position corresponding to given 2d screen position.
- Parameters
-
x | and y in screen coordinate as an input. |
x,y | and z in world coordinate as an output. |
◆ isFusionSupported()
boolean com.maxst.ar.TrackerManager.isFusionSupported |
( |
| ) |
|
Get a boolean value representing whether the current device supports AR fusion trackers.
- Returns
- true if the device supports AR fusion trackers.
◆ isTrackerDataLoadCompleted()
boolean com.maxst.ar.TrackerManager.isTrackerDataLoadCompleted |
( |
| ) |
|
Get a boolean value representing whether loading the map files is complete.
- Returns
- true if loading the map files is complete.
◆ loadTrackerData()
void com.maxst.ar.TrackerManager.loadTrackerData |
( |
| ) |
|
Load the map files in the candidate list to a memory. This method runs asynchrously to the main (UI) thread.
◆ quitFindingSurface()
void com.maxst.ar.TrackerManager.quitFindingSurface |
( |
| ) |
|
Stop to find the ground plane. It works only on Instant Tracker.
◆ requestARCoreApk()
static String com.maxst.ar.TrackerManager.requestARCoreApk |
( |
Activity |
activity | ) |
|
|
static |
Get a message with respect to preparation of ARCore in the current app.
- Returns
- true if the device supports AR fusion trackers.
◆ setCloudRecognitionSecretIdAndKey()
void com.maxst.ar.TrackerManager.setCloudRecognitionSecretIdAndKey |
( |
String |
secretId, |
|
|
String |
secretKey |
|
) |
| |
Set secret ID and key for access of cloud recognition.
The secret Id and key can be obtained through https://developer.maxst.com.
- Parameters
-
secretId | secret ID |
secretKey | secret key |
◆ setTrackingOption()
void com.maxst.ar.TrackerManager.setTrackingOption |
( |
TrackingOption |
option | ) |
|
Set tracking options for AR Trackers.
Tracking options consists of two groups; Jitter Control Group(JITTER_REDUCTION_ACTIVATION and JITTER_REDUCTION_DEACTIVATION) and Functionaliy Control Group(NORMAL_TRACKING, ENHANCED_TRACKING, EXTENDED_TRACKING, and MULTI_TRACKING).
In each group, only one option is selected. The default option in Jitter Control Group is JITTER_REDUCTION_DEACTIVATION and the default in Functionaliy Control Group is NORMAL_TRACKING. Each option works on the different trackers, so please check which tracker supports which options.
- Parameters
-
◆ startTracker()
void com.maxst.ar.TrackerManager.startTracker |
( |
int |
trackerType | ) |
|
Start a AR tracker.
MAXST AR provices the following trackers; Marker Tracker, QRcode Tracker, Image Tracker, Cloud Recognizer, Instant Tracker, Marker Fusion Tracker, QRCode Fusion Tracker, Image Fusion Tracker, Instant Fusion Tracker, Object Fusion Tracker, QR/Barcode Scanner.
Only one tracker can be run at one time.
- Parameters
-
trackerType | tracker type (trackerType should be among TRACKER_TYPE_CODE_SCANNER, TRACKER_TYPE_IMAGE, TRACKER_TYPE_MARKER, TRACKER_TYPE_OBJECT, TRACKER_TYPE_INSTANT, TRACKER_TYPE_QR_TRACKER, TRACKER_TYPE_CLOUD_RECOGNIZER, TRACKER_TYPE_IMAGE_FUSION, TRACKER_TYPE_OBJECT_FUSION, TRACKER_TYPE_QR_FUSION, TRACKER_TYPE_MARKER_FUSION, and TRACKER_TYPE_INSTANT_FUSION.) |
◆ stopTracker()
void com.maxst.ar.TrackerManager.stopTracker |
( |
| ) |
|
◆ updateTrackingState()
TrackingState com.maxst.ar.TrackerManager.updateTrackingState |
( |
| ) |
|
Update and get the current tracking state.
- Returns
- the updated tracking state
◆ TRACKER_TYPE_CLOUD_RECOGNIZER
final int com.maxst.ar.TrackerManager.TRACKER_TYPE_CLOUD_RECOGNIZER = 0x30 |
|
static |
◆ TRACKER_TYPE_CODE_SCANNER
final int com.maxst.ar.TrackerManager.TRACKER_TYPE_CODE_SCANNER = 0X01 |
|
static |
◆ TRACKER_TYPE_IMAGE
final int com.maxst.ar.TrackerManager.TRACKER_TYPE_IMAGE = 0X02 |
|
static |
◆ TRACKER_TYPE_IMAGE_FUSION
final int com.maxst.ar.TrackerManager.TRACKER_TYPE_IMAGE_FUSION = 0x80 |
|
static |
◆ TRACKER_TYPE_INSTANT
final int com.maxst.ar.TrackerManager.TRACKER_TYPE_INSTANT = 0x20 |
|
static |
◆ TRACKER_TYPE_INSTANT_FUSION
final int com.maxst.ar.TrackerManager.TRACKER_TYPE_INSTANT_FUSION = 0x10000 |
|
static |
◆ TRACKER_TYPE_MARKER
final int com.maxst.ar.TrackerManager.TRACKER_TYPE_MARKER = 0X04 |
|
static |
◆ TRACKER_TYPE_MARKER_FUSION
final int com.maxst.ar.TrackerManager.TRACKER_TYPE_MARKER_FUSION = 0x800 |
|
static |
◆ TRACKER_TYPE_OBJECT
final int com.maxst.ar.TrackerManager.TRACKER_TYPE_OBJECT = 0X08 |
|
static |
◆ TRACKER_TYPE_OBJECT_FUSION
final int com.maxst.ar.TrackerManager.TRACKER_TYPE_OBJECT_FUSION = 0x100 |
|
static |
◆ TRACKER_TYPE_QR_FUSION
final int com.maxst.ar.TrackerManager.TRACKER_TYPE_QR_FUSION = 0x400 |
|
static |
◆ TRACKER_TYPE_QR_TRACKER
final int com.maxst.ar.TrackerManager.TRACKER_TYPE_QR_TRACKER = 0x40 |
|
static |