C++ Java Unity
C++ Reference
Trackable Class Referenceabstract

Detailed Description

Base class for all objects that can be tracked.

Every Trackable has a name, an id and a type.

Trackables report their tracking status and pose via TrackableResult instances, which appear on the State for a given camera frame if the Trackable has been detected or tracked (or extended tracked) in that frame.

Inheritance diagram for Trackable:
NonCopyable Anchor DeviceTrackable ObjectTarget CylinderTarget ImageTarget ModelTarget MultiTarget VuMarkTarget VuMarkTemplate

Public Member Functions

virtual Type getType () const =0
 Get the Type for this instance (typically a subclass of Trackable). More...
 
virtual bool isOfType (Type type) const =0
 Check whether this instance is of the given Type or any of its subclasses. More...
 
virtual int getId () const =0
 Get a unique id for this Trackable. More...
 
virtual const char * getName () const =0
 Get the name of this Trackable's name. More...
 
virtual bool setUserData (void *userData)=0
 Set user data for this Trackable. More...
 
virtual void * getUserData () const =0
 Get the user data that was previously set using setUserData(). More...
 
virtual ~Trackable ()
 

Static Public Member Functions

static Type getClassType ()
 Get the Type of class 'Trackable'. More...
 

Constructor & Destructor Documentation

virtual ~Trackable ( )
inlinevirtual

Member Function Documentation

static Type getClassType ( )
static

Get the Type of class 'Trackable'.

virtual Type getType ( ) const
pure virtual

Get the Type for this instance (typically a subclass of Trackable).

virtual bool isOfType ( Type  type) const
pure virtual

Check whether this instance is of the given Type or any of its subclasses.

virtual int getId ( ) const
pure virtual

Get a unique id for this Trackable.

The id is generated at runtime and is not persistent between Vuforia sessions.

See also
ObjectTarget::getUniqueTargetId()
virtual const char* getName ( ) const
pure virtual

Get the name of this Trackable's name.

virtual bool setUserData ( void *  userData)
pure virtual

Set user data for this Trackable.

You can set anything you like here. Retrieve it at any time using getUserData().

Returns
true if the user data was successfully set, otherwise false
virtual void* getUserData ( ) const
pure virtual

Get the user data that was previously set using setUserData().