C++ Java Unity
Java Reference
TrackerManager Class Reference

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.

Public Member Functions

boolean equals (Object obj)
 
Tracker initTracker (Type type)
 Initialize and return the given Tracker, if it is not already initialized. More...
 
Tracker getTracker (Type type)
 Get the given Tracker. More...
 
boolean deinitTracker (Type type)
 Deinitialize (destroy) the given Tracker. More...
 
StateUpdater getStateUpdater ()
 Get the StateUpdater instance that provides State objects for the configured trackers. More...
 

Static Public Member Functions

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

Member Function Documentation

boolean equals ( Object  obj)
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().

Tracker initTracker ( Type  type)

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.
Tracker getTracker ( Type  type)

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.
boolean deinitTracker ( Type  type)

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.
StateUpdater getStateUpdater ( )

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