C++ Java Unity
C++ Reference
TrackerManager Class Referenceabstract

Detailed Description

Singleton for initializing, accessing, and deinitializing Tracker objects.

The TrackerManager singleton is available via TrackerManager::getInstance() immediately after calling Vuforia::init(). Use it to configure any trackers required by your app.

Note
If your app implements suspend/resume (for example on mobile devices), you need to handle Tracker instances carefully as part of this process. See the "Lifecycle of a Vuforia app" section on the main Vuforia reference page for more information. Lifecycle of a Vuforia app

See the inheritance tree diagram in the Tracker base class for a list of available tracker types.

Inheritance diagram for TrackerManager:
NonCopyable

Public Member Functions

virtual TrackerinitTracker (Type type)=0
 Initialize and return the given Tracker, if it is not already initialized. More...
 
virtual TrackergetTracker (Type type)=0
 Get the given Tracker. More...
 
virtual bool deinitTracker (Type type)=0
 Deinitialize (destroy) the given Tracker. More...
 
virtual StateUpdatergetStateUpdater ()=0
 Get the StateUpdater instance that provides State objects for the configured trackers. More...
 

Static Public Member Functions

static TrackerManagergetInstance ()
 Get the TrackerManager singleton instance. More...
 

Member Function Documentation

static TrackerManager& getInstance ( )
static

Get the TrackerManager singleton instance.

The TrackerManager instance is available immediately after Vuforia::init() has succeeded.

It is no longer available after calling Vuforia::deinit().

virtual Tracker* initTracker ( Type  type)
pure virtual

Initialize and return the given Tracker, if it is not already initialized.

Note
This method can only be called while the CameraDevice is uninitialized. If your app implements suspend/resume (for example on mobile devices), you need to handle trackers carefully as part of this process. See Vuforia::init() for more details.

This method will return NULL if

  • the requested Tracker type is not supported on the current device, system, or platform, or
  • the requested Tracker type has already been initialized, or
  • the camera is currently initialized.
Note
Only one instance of each Type of Tracker can be initialized.
Parameters
typeWhich Tracker to initialize. See the inheritance tree diagram on the Tracker base class for a list of available Tracker types.
Returns
The initialized Tracker, or NULL if either: the requested Tracker is already initialized; the requested Tracker is not supported on the current device, system, or platform; or the CameraDevice is currently initialized.
virtual Tracker* getTracker ( Type  type)
pure virtual

Get the given Tracker.

Parameters
typeWhich Tracker to return. See the inheritance tree diagram on the Tracker base class for a list of available Tracker types.
Returns
The requester Tracker instance, or NULL if no instance of this type has been initialized.
virtual bool deinitTracker ( Type  type)
pure virtual

Deinitialize (destroy) the given Tracker.

Also frees any resources used by the Tracker.

This method can only be called while the CameraDevice is uninitialized.

Parameters
typeWhich Tracker to deinitialize.
Returns
true on success, or false if no such Tracker is initialized, or if the CameraDevice is currently initialized or started.
virtual StateUpdater& getStateUpdater ( )
pure virtual

Get the StateUpdater instance that provides State objects for the configured trackers.