MaxstARSDK
All Classes Files Functions Variables Enumerations Enumerator Macros
MasTrackerManager Class Reference

Control AR Engine. More...

#import <MasTrackerManager.h>

Inheritance diagram for MasTrackerManager:
Inheritance graph
Collaboration diagram for MasTrackerManager:
Collaboration graph

Instance Methods

(void) - startTracker:
 Start AR engine. Only one tracking engine could be run at one time. More...
 
(void) - stopTracker
 Stop tracking engine. More...
 
(void) - destroyTracker
 Remove all tracking data (Map data and tracking result) More...
 
(void) - addTrackerData:
 Add map file to candidate list. More...
 
(void) - removeTrackerData:
 Remove map file from candidate list. More...
 
(void) - loadTrackerData
 Load map files in candidate list to memory. This method don't block main(UI) thread. More...
 
(bool) - isTrackerDataLoadCompleted
 Get map files loading state. This is for UI expression. More...
 
(MasTrackingState *) - updateTrackingState
 
(void) - findSurface
 Start to find the surface of an environment from a camera image. More...
 
(void) - quitFindingSurface
 Stop to find the surface. More...
 
(MasSurfaceThumbnail *) - saveSurfaceData:
 Save the surface data to file. More...
 
(void) - getWorldPositionFromScreenCoordinate:world:
 Get 3d world coordinate corresponding to given 2d screen position. More...
 
(int) - getKeyframeCount
 Get the number of keyframes included in surface data. More...
 
(int) - getFeatureCount
 Get the number of features included in surface data. More...
 
(MasSurfaceMesh *) - getSurfaceMesh
 Get surface mesh information of the found surface after the findSurface method has been called. More...
 
(void) - setTrackingOption:
 Set tracking options. 1, 2, 4 cannot run simultaneously. More...
 
(void) - saveFrames
 

Protected Types

enum  TrackerType : int {
  TRACKER_TYPE_CODE_SCANNER = 0x01, TRACKER_TYPE_IMAGE = 0x02, TRACKER_TYPE_OBJECT = 0X08, TRACKER_TYPE_SLAM = 0x10,
  TRACKER_TYPE_INSTANT = 0x20
}
 Tracker Type TRACKER_TYPE_CODE_SCANNER Code scanner TRACKER_TYPE_IMAGE Planar image tracker TRACKER_TYPE_OBJECT Object tracker (Object data should be created via SLAM tracker) TRACKER_TYPE_SLAM Visual slam tracker (Can create surface data and save it) TRACKER_TYPE_INSTANT Instant tracker. More...
 
enum  TrackingOption : int { NORMAL_TRACKING = 0x01, EXTENDED_TRACKING = 0x02, MULTI_TRACKING = 0x04 }
 Additional tracking option. NORMAL_TRACKING Normal Tracking (Image Tracker Only) EXTENDED_TRACKING Extended Tracking (Image Tracker Only) MULTI_TRACKING Multi Target Tracking (Image Tracker Only) More...
 

Detailed Description

Control AR Engine.

Member Enumeration Documentation

◆ TrackerType

- (enum TrackerType) :
protected

Tracker Type TRACKER_TYPE_CODE_SCANNER Code scanner TRACKER_TYPE_IMAGE Planar image tracker TRACKER_TYPE_OBJECT Object tracker (Object data should be created via SLAM tracker) TRACKER_TYPE_SLAM Visual slam tracker (Can create surface data and save it) TRACKER_TYPE_INSTANT Instant tracker.

Enumerator
TRACKER_TYPE_CODE_SCANNER 
TRACKER_TYPE_IMAGE 
TRACKER_TYPE_OBJECT 
TRACKER_TYPE_SLAM 
TRACKER_TYPE_INSTANT 

◆ TrackingOption

- (enum TrackingOption) :
protected

Additional tracking option. NORMAL_TRACKING Normal Tracking (Image Tracker Only) EXTENDED_TRACKING Extended Tracking (Image Tracker Only) MULTI_TRACKING Multi Target Tracking (Image Tracker Only)

Enumerator
NORMAL_TRACKING 
EXTENDED_TRACKING 
MULTI_TRACKING 

Method Documentation

◆ addTrackerData:()

- (void) addTrackerData: (NSString *)  trackingFileName

Add map file to candidate list.

Parameters
trackingFileNameabsolute file path

◆ destroyTracker()

- (void) destroyTracker

Remove all tracking data (Map data and tracking result)

◆ findSurface()

- (void) findSurface

Start to find the surface of an environment from a camera image.

◆ getFeatureCount()

- (int) getFeatureCount

Get the number of features included in surface data.

Returns
feature point count

◆ getKeyframeCount()

- (int) getKeyframeCount

Get the number of keyframes included in surface data.

Returns
key frame count

◆ getSurfaceMesh()

- (MasSurfaceMesh*) getSurfaceMesh

Get surface mesh information of the found surface after the findSurface method has been called.

Returns
MasSurfaceMesh instance

◆ getWorldPositionFromScreenCoordinate:world:()

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

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

Parameters
screenscreen touch x, y position
worldworld position x, y, z

◆ isTrackerDataLoadCompleted()

- (bool) isTrackerDataLoadCompleted

Get map files loading state. This is for UI expression.

Returns
true if map loading is completed

◆ loadTrackerData()

- (void) loadTrackerData

Load map files in candidate list to memory. This method don't block main(UI) thread.

◆ quitFindingSurface()

- (void) quitFindingSurface

Stop to find the surface.

◆ removeTrackerData:()

- (void) removeTrackerData: (NSString *)  trackingFileName

Remove map file from candidate list.

Parameters
trackingFileNamemap file name. This name should be same which added. If set "" (empty) file list will be cleared.

◆ saveFrames()

- (void) saveFrames

◆ saveSurfaceData:()

- (MasSurfaceThumbnail*) saveSurfaceData: (NSString *)  outputFileName

Save the surface data to file.

Parameters
outputFileNamefile path (should be absolute path)
Returns
MasSurfaceThumbnail instance if true else null

◆ setTrackingOption:()

- (void) setTrackingOption: (TrackingOption option

Set tracking options. 1, 2, 4 cannot run simultaneously.

Parameters
option1 : Normal Tracking (Image Tracker Only) 2 : Extended Tracking (Image Tracker Only) 4 : Multiple Target Tracking (Image Tracker Only)

◆ startTracker:()

- (void) startTracker: (TrackerType trackerMask

Start AR engine. Only one tracking engine could be run at one time.

Parameters
trackerMasktracking engine type

◆ stopTracker()

- (void) stopTracker

Stop tracking engine.

◆ updateTrackingState()

- (MasTrackingState*) updateTrackingState

Update tracking state. This function should be called before getTrackingResult and background rendering

Returns
Tracking state container

The documentation for this class was generated from the following file: