MaxstARSDK
com.maxst.ar.TrackerManager Class Reference
Collaboration diagram for com.maxst.ar.TrackerManager:
Collaboration graph

Classes

enum  TrackingOption
 

Public Member Functions

void startTracker (int trackerType)
 
void setCloudRecognitionSecretIdAndKey (String secretId, String secretKey)
 
void stopTracker ()
 
void destroyTracker ()
 
void addTrackerData (String trackingFileName, boolean isAndroidAssetFile)
 
void removeTrackerData (String trackingFileName)
 
void loadTrackerData ()
 
boolean isTrackerDataLoadCompleted ()
 
boolean isFusionSupported ()
 
int getFusionTrackingState ()
 
void setVocabulary (String filepath, boolean isAndroidAssetFile)
 
TrackingState updateTrackingState ()
 
void findSurface ()
 
void quitFindingSurface ()
 
void setTrackingOption (TrackingOption option)
 
SurfaceThumbnail saveSurfaceData (String fileName)
 
void getWorldPositionFromScreenCoordinate (float[] screenCoord, float[] worldPos)
 
GuideInfo getGuideInformation ()
 
void saveFrames ()
 

Static Public Member Functions

static TrackerManager getInstance ()
 
static String requestARCoreApk (Activity activity)
 

Static Public Attributes

static final int TRACKER_TYPE_CODE_SCANNER = 0X01
 
static final int TRACKER_TYPE_IMAGE = 0X02
 
static final int TRACKER_TYPE_MARKER = 0X04
 
static final int TRACKER_TYPE_OBJECT = 0X08
 
static final int TRACKER_TYPE_INSTANT = 0x20
 
static final int TRACKER_TYPE_QR_TRACKER = 0x40
 
static final int TRACKER_TYPE_CLOUD_RECOGNIZER = 0x30
 
static final int TRACKER_TYPE_IMAGE_FUSION = 0x80
 
static final int TRACKER_TYPE_OBJECT_FUSION = 0x100
 
static final int TRACKER_TYPE_QR_FUSION = 0x400
 
static final int TRACKER_TYPE_MARKER_FUSION = 0x800
 
static final int TRACKER_TYPE_SPACE = 0x8000
 
static final int TRACKER_TYPE_INSTANT_FUSION = 0x10000
 

Detailed Description

Control AR Engine

Member Function Documentation

◆ addTrackerData()

void com.maxst.ar.TrackerManager.addTrackerData ( String  trackingFileName,
boolean  isAndroidAssetFile 
)

Add map file to candidate list.

Parameters
trackingFileNameabsolute file path if map file is located in sdcard, relative file name path map file is located in assets folder
isAndroidAssetFileflag for notify map file is located in assets folder
Here is the caller graph for this function:

◆ destroyTracker()

void com.maxst.ar.TrackerManager.destroyTracker ( )

Remove all tracking data (Map data and tracking result)

◆ findSurface()

void com.maxst.ar.TrackerManager.findSurface ( )

Start to find the surface of an environment from a camera image (works on Instant Tracker and SLAM)

◆ getFusionTrackingState()

int com.maxst.ar.TrackerManager.getFusionTrackingState ( )

Get tracking fusion state.

Returns
tracking status 'Success' is 1 or not -1

◆ getGuideInformation()

GuideInfo com.maxst.ar.TrackerManager.getGuideInformation ( )

Get guide information describing SLAM status (initializing progress, # keyframes, # features and feature position) after the findSurface method has been called

Returns
GuideInfo instance

◆ getInstance()

static TrackerManager com.maxst.ar.TrackerManager.getInstance ( )
static
Here is the caller graph for this function:

◆ getWorldPositionFromScreenCoordinate()

void com.maxst.ar.TrackerManager.getWorldPositionFromScreenCoordinate ( float[]  screenCoord,
float[]  worldPos 
)

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

Parameters
screenCoordscreen touch x, y position
worldPosworld position x, y, z

◆ isFusionSupported()

boolean com.maxst.ar.TrackerManager.isFusionSupported ( )

Get the device supports Fusion.

Returns
true if device supports Fusion

◆ isTrackerDataLoadCompleted()

boolean com.maxst.ar.TrackerManager.isTrackerDataLoadCompleted ( )

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

Returns
true if map loading is completed

◆ loadTrackerData()

void com.maxst.ar.TrackerManager.loadTrackerData ( )

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

◆ quitFindingSurface()

void com.maxst.ar.TrackerManager.quitFindingSurface ( )

Stop to find the surface (works on Instant Tracker and SLAM)

◆ removeTrackerData()

void com.maxst.ar.TrackerManager.removeTrackerData ( String  trackingFileName)

Remove map file from candidate list.

Parameters
trackingFileNamemap file name. If set "" (empty) file list will be cleared.

◆ requestARCoreApk()

static String com.maxst.ar.TrackerManager.requestARCoreApk ( Activity  activity)
static

Get ARCore Support

Returns
Explain ARCore is supported.

◆ saveFrames()

void com.maxst.ar.TrackerManager.saveFrames ( )

◆ saveSurfaceData()

SurfaceThumbnail com.maxst.ar.TrackerManager.saveSurfaceData ( String  fileName)

Save the surface data to file (works on only SLAM). A saved file is loaded and used in Object Tracker.

Parameters
fileNamefile path (should be absolute path)
Returns
SurfaceThumbnail instance if true else null

◆ setCloudRecognitionSecretIdAndKey()

void com.maxst.ar.TrackerManager.setCloudRecognitionSecretIdAndKey ( String  secretId,
String  secretKey 
)

Set secret ID and key for access of cloud recognition

Parameters
secretIdsecret ID
secretKeysecret key

◆ setTrackingOption()

void com.maxst.ar.TrackerManager.setTrackingOption ( TrackingOption  option)

Set tracking options.

Parameters
optiontracking option TrackingOption.NORMAL_TRACKING : Normal Tracking (Image Tracker Only, Default Option for Image Tracker) TrackingOption.EXTENDED_TRACKING : Extended Tracking (Image Tracker Only) TrackingOption.MULTI_TRACKING : Multiple Target Tracking (Image Tracker Only) TrackingOption.JITTER_REDUCTION_ACTIVATION : Jitter Reduction Activation (Marker, Image, and Object Tracker) TrackingOption.JITTER_REDUCTION_DEACTIVATION : Jitter Reduction Deactivation (Marker, Image, and Object Tracker, Default Option for Jitter Reduction)
Here is the call graph for this function:

◆ setVocabulary()

void com.maxst.ar.TrackerManager.setVocabulary ( String  filepath,
boolean  isAndroidAssetFile 
)

Load vocabulary file

Parameters
filepathvocabulary file path.

◆ startTracker()

void com.maxst.ar.TrackerManager.startTracker ( int  trackerType)

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

Parameters
trackerTypetracking engine type

◆ stopTracker()

void com.maxst.ar.TrackerManager.stopTracker ( )

Stop tracking engine

◆ updateTrackingState()

TrackingState com.maxst.ar.TrackerManager.updateTrackingState ( )

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

Returns
tracking state

Member Data Documentation

◆ TRACKER_TYPE_CLOUD_RECOGNIZER

final int com.maxst.ar.TrackerManager.TRACKER_TYPE_CLOUD_RECOGNIZER = 0x30
static

Cloud recognizer

◆ TRACKER_TYPE_CODE_SCANNER

final int com.maxst.ar.TrackerManager.TRACKER_TYPE_CODE_SCANNER = 0X01
static

Code scanner

◆ TRACKER_TYPE_IMAGE

final int com.maxst.ar.TrackerManager.TRACKER_TYPE_IMAGE = 0X02
static

Planar image tracker

◆ TRACKER_TYPE_IMAGE_FUSION

final int com.maxst.ar.TrackerManager.TRACKER_TYPE_IMAGE_FUSION = 0x80
static

Planar image fusion tracker

◆ TRACKER_TYPE_INSTANT

final int com.maxst.ar.TrackerManager.TRACKER_TYPE_INSTANT = 0x20
static

Instant tracker

◆ TRACKER_TYPE_INSTANT_FUSION

final int com.maxst.ar.TrackerManager.TRACKER_TYPE_INSTANT_FUSION = 0x10000
static

Instant fusion tracker

◆ TRACKER_TYPE_MARKER

final int com.maxst.ar.TrackerManager.TRACKER_TYPE_MARKER = 0X04
static

Marker tracker

◆ TRACKER_TYPE_MARKER_FUSION

final int com.maxst.ar.TrackerManager.TRACKER_TYPE_MARKER_FUSION = 0x800
static

Marker fusion tracker

◆ TRACKER_TYPE_OBJECT

final int com.maxst.ar.TrackerManager.TRACKER_TYPE_OBJECT = 0X08
static

Object tracker (Object data should be created via SLAM tracker)

◆ TRACKER_TYPE_OBJECT_FUSION

final int com.maxst.ar.TrackerManager.TRACKER_TYPE_OBJECT_FUSION = 0x100
static

Object fusion tracker (Object data should be created via SLAM tracker)

◆ TRACKER_TYPE_QR_FUSION

final int com.maxst.ar.TrackerManager.TRACKER_TYPE_QR_FUSION = 0x400
static

QRCode fusion tracker

◆ TRACKER_TYPE_QR_TRACKER

final int com.maxst.ar.TrackerManager.TRACKER_TYPE_QR_TRACKER = 0x40
static

Qrcode tracker

◆ TRACKER_TYPE_SPACE

final int com.maxst.ar.TrackerManager.TRACKER_TYPE_SPACE = 0x8000
static

Space tracker


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