MaxstAR Native iOS  5.0.2
List of all members | Instance Methods | Protected Types | Protected Attributes
MasTrackerManager Class Reference

Description

MasTrackerManager class controls trackers provided by MAXST AR.

Inherits NSObject typedef public enum TrackerType.

Instance Methods

(void) - startTracker
 Start a AR tracker. More...
 
(void) - stopTracker
 Stop a tracker. More...
 
(void) - destroyTracker
 Destroy a tracker. Remove all tracking data including map data and tracking results. More...
 
(void) - addTrackerData:
 Add a map file to the candidate list for Image Tracker, Object Tracker, Image Fusion Tracker and Object Fusion Tracker. More...
 
(void) - removeTrackerData
 Remove a map file from the candidate list. More...
 
(void) - loadTrackerData
 Load the map files in the candidate list to a memory. This method runs asynchronously to the main (UI) thread. More...
 
(bool) - isTrackerDataLoadCompleted
 Get a boolean value representing whether loading the map files is complete. More...
 
(bool) - isFusionSupported
 Get a boolean value representing whether the current device supports AR fusion trackers. More...
 
(int) - getFusionTrackingState
 Get the status of the AR fusion tracker working on the current app. More...
 
(MasTrackingState *) - updateTrackingState
 Update and get the current tracking state. More...
 
(void) - findSurface
 Start to find the groud plane visible through the camera. It works only on Instant Tracker. More...
 
(void) - quitFindingSurface
 Stop to find the ground plane. It works only on Instant Tracker. More...
 
(void) - getWorldPositionFromScreenCoordinate
 Get 3d world position corresponding to given 2d screen position. More...
 
(MasGuideInfo *) - getGuideInformation
 Get the guide information such as feature points, a bounding box and anchors concerning Object Tracker. More...
 
(void) - setTrackingOption
 Set tracking options for AR Trackers. More...
 
(void) - setCloudRecognitionSecretId
 Set secret ID and key for access of cloud recognition. More...
 

Protected Attributes

 TRACKER_TYPE_CODE_SCANNER = 0x01
 
 TRACKER_TYPE_IMAGE = 0x02
 
 TRACKER_TYPE_MARKER = 0X04
 
 TRACKER_TYPE_OBJECT = 0X08
 
 TRACKER_TYPE_INSTANT = 0x20
 
 TRACKER_TYPE_CLOUD_RECOGNIZER = 0x30
 
 TRACKER_TYPE_QR_TRACKER = 0x40
 
 TRACKER_TYPE_IMAGE_FUSION = 0x80
 
 TRACKER_TYPE_OBJECT_FUSION = 0x100
 
 TRACKER_TYPE_QR_FUSION = 0x400
 
 TRACKER_TYPE_MARKER_FUSION = 0x800
 
 TRACKER_TYPE_INSTANT_FUSION = 0x10000
 

Member Enumeration Documentation

◆ TrackingOption

- (enum) TrackingOption
protected

Tracking option enumerator for further functionality.

Tracking options consist 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.

Enumerator
NORMAL_TRACKING 

Normal Tracking (Default, It works on Marker, Image, and Object Tracker.)

EXTENDED_TRACKING 

Extended Tracking (It works on Image and Object Traker.)

ENHANCED_TRACKING 

Enhanced Tracking (It works on Marker Tracker.)

MULTI_TRACKING 

Simultaneous Target Tracking (It works only on Image Tracker.)

JITTER_REDUCTION_ACTIVATION 

Jitter Reduction Activation (It works on Marker, Image, Instant, QRCode)

JITTER_REDUCTION_DEACTIVATION 

Jitter Reduction Deactivation (It works on Marker, Image, QRCode)

Method Documentation

◆ addTrackerData:

- (void) addTrackerData: (NSString *)  trackingFileName

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
trackingFileNameabsolute file path if the map file is located in App Sandbox.

◆ destroyTracker

- (void) destroyTracker

Destroy a tracker. Remove all tracking data including map data and tracking results.

◆ findSurface

- (void) findSurface

Start to find the groud plane visible through the camera. It works only on Instant Tracker.

◆ getFusionTrackingState

- (int) 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

- (MasGuideInfo *) 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

◆ getWorldPositionFromScreenCoordinate

- (void) getWorldPositionFromScreenCoordinate: (float *)  screen
world: (float *)  world 

Get 3d world position corresponding to given 2d screen position.

Parameters
xand y in screen coordinate as an input.
x,yand z in world coordinate as an output.

◆ isFusionSupported

- (bool) isFusionSupported

Get a boolean value representing whether the current device supports AR fusion trackers.

Returns
true if the device supports AR fusion trackers.

◆ isTrackerDataLoadCompleted

- (bool) isTrackerDataLoadCompleted

Get a boolean value representing whether loading the map files is complete.

Returns
true if loading the map files is complete.

◆ loadTrackerData

- (void) loadTrackerData

Load the map files in the candidate list to a memory. This method runs asynchronously to the main (UI) thread.

◆ quitFindingSurface

- (void) quitFindingSurface

Stop to find the ground plane. It works only on Instant Tracker.

◆ removeTrackerData

- (void) removeTrackerData: (NSString *)  trackingFileName

Remove a map file from the candidate list.

To actually remove the map from the tracker, loadTrackerData should be called.

Parameters
trackingFileNamethe file path of a map to want to remove. If trackingFileName is set to "", all map files will be cleared.

◆ setCloudRecognitionSecretId

- (void) setCloudRecognitionSecretId: (NSString *)  secretId
secretKey: (NSString *)  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
secretIdsecret ID
secretKeysecret key

◆ setTrackingOption

- (void) 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
optiontracking option TrackingOption.JITTER_REDUCTION_ACTIVATION : Jitter Reduction Activation (It works on Marker, Image, Instant, QRCode)
TrackingOption.JITTER_REDUCTION_DEACTIVATION : Jitter Reduction Deactivation (Marker, Image)
TrackingOption.NORMAL_TRACKING : Normal Tracking (It works on Marker, Image, and Object Tracker.)
TrackingOption.ENHANCED_TRACKING : Enhanced Tracking (It works on Marker Tracker.)
TrackingOption.EXTENDED_TRACKING : Extended Tracking (It works on Image and Object Traker.)
TrackingOption.MULTI_TRACKING : Multiple Target Tracking (It works only on Image Tracker.)

◆ startTracker

- (void) startTracker: (TrackerType)  trackerMask

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
trackerTypetracker 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) stopTracker

Stop a tracker.

◆ updateTrackingState

- (MasTrackingState *) updateTrackingState

Update and get the current tracking state.

Returns
the updated tracking state

Member Data Documentation

◆ TRACKER_TYPE_CLOUD_RECOGNIZER

- TRACKER_TYPE_CLOUD_RECOGNIZER = 0x30
protected

Cloud Recognizer

◆ TRACKER_TYPE_CODE_SCANNER

- TRACKER_TYPE_CODE_SCANNER = 0x01
protected

QR/Barcode scanner

◆ TRACKER_TYPE_IMAGE

- TRACKER_TYPE_IMAGE = 0x02
protected

Image Tracker

◆ TRACKER_TYPE_IMAGE_FUSION

- TRACKER_TYPE_IMAGE_FUSION = 0x80
protected

Image Fusion Tracker

◆ TRACKER_TYPE_INSTANT

- TRACKER_TYPE_INSTANT = 0x20
protected

Instant Tracker

◆ TRACKER_TYPE_INSTANT_FUSION

- TRACKER_TYPE_INSTANT_FUSION = 0x10000
protected

Instant Fusion Tracker

◆ TRACKER_TYPE_MARKER

- TRACKER_TYPE_MARKER = 0X04
protected

Marker Tracker

◆ TRACKER_TYPE_MARKER_FUSION

- TRACKER_TYPE_MARKER_FUSION = 0x800
protected

Marker Fusion Tracker

◆ TRACKER_TYPE_OBJECT

- TRACKER_TYPE_OBJECT = 0X08
protected

Object Tracker

◆ TRACKER_TYPE_OBJECT_FUSION

- TRACKER_TYPE_OBJECT_FUSION = 0x100
protected

Object Fusion Tracker

◆ TRACKER_TYPE_QR_FUSION

- TRACKER_TYPE_QR_FUSION = 0x400
protected

QRCode Fusion Tracker

◆ TRACKER_TYPE_QR_TRACKER

- TRACKER_TYPE_QR_TRACKER = 0x40
protected

QRCode Tracker