C++ Java Unity
C++ Reference
ImageTarget Class Referenceabstract

Detailed Description

A type of ObjectTarget that represents a 2D image or a planar object.

Note
It is not possible to modify an ImageTarget while its DataSet is active. See the DataSet class for more information.
Inheritance diagram for ImageTarget:
ObjectTarget Trackable NonCopyable

Public Member Functions

virtual List< VirtualButtongetVirtualButtons ()=0
 
virtual List< const VirtualButtongetVirtualButtons () const =0
 
virtual VirtualButtongetVirtualButton (const char *name)=0
 Get (by name) one of the VirtualButton objects associated with this ImageTarget. More...
 
virtual const VirtualButtongetVirtualButton (const char *name) const =0
 Get (by name) one of the VirtualButton objects associated with this ImageTarget. More...
 
virtual VirtualButtoncreateVirtualButton (const char *name, const Area &area)=0
 Create a new virtual button and add it to this ImageTarget. More...
 
virtual bool destroyVirtualButton (VirtualButton *button)=0
 Destroy one of this ImageTarget's virtual buttons. More...
 
virtual const char * getMetaData () const =0
 Get the meta data string for this ImageTarget. More...
 
- Public Member Functions inherited from ObjectTarget
virtual const char * getUniqueTargetId () const =0
 Get the persistent system-wide unique id for this target. More...
 
virtual Vec3F getSize () const =0
 Get the size of this target. More...
 
virtual bool setSize (const Vec3F &size)=0
 Apply a uniform scale to this target that makes it the given size. More...
 
virtual bool setMotionHint (MOTION_HINT hint)=0
 Set the motion hint to indicate how the target moves in space. More...
 
virtual MOTION_HINT getMotionHint () const =0
 Get the motion hint of this target. More...
 
- Public Member Functions inherited from Trackable
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 for class "ImageTarget". More...
 
- Static Public Member Functions inherited from ObjectTarget
static Type getClassType ()
 Get the Type for class "ObjectTarget". More...
 
- Static Public Member Functions inherited from Trackable
static Type getClassType ()
 Get the Type of class 'Trackable'. More...
 

Additional Inherited Members

- Public Types inherited from ObjectTarget
enum  MOTION_HINT {
  STATIC,
  ADAPTIVE
}
 Target property that indicates how the target moves in space. More...
 

Member Function Documentation

static Type getClassType ( )
static

Get the Type for class "ImageTarget".

virtual List<VirtualButton> getVirtualButtons ( )
pure virtual

Provides write access to the list of virtual buttons defined for this ImageTarget.

virtual List<const VirtualButton> getVirtualButtons ( ) const
pure virtual

Provides read-only access to the list of virtual buttons defined for this ImageTarget.

virtual VirtualButton* getVirtualButton ( const char *  name)
pure virtual

Get (by name) one of the VirtualButton objects associated with this ImageTarget.

Parameters
nameThe name of the VirtualButton to get.
Returns
The requested VirtualButton, or NULL if this ImageTarget does not define a button with the requested name.
virtual const VirtualButton* getVirtualButton ( const char *  name) const
pure virtual

Get (by name) one of the VirtualButton objects associated with this ImageTarget.

Parameters
nameThe name of the VirtualButton to get.
Returns
The requested VirtualButton, or NULL if this ImageTarget does not define a button with the requested name.
virtual VirtualButton* createVirtualButton ( const char *  name,
const Area area 
)
pure virtual

Create a new virtual button and add it to this ImageTarget.

Parameters
nameThe name for the new VirtualButton.
areaAn Area instance (e.g. a Rectangle) describing the extents of the button, in this target's local coordinate system.
Returns
The new VirtualButton, or NULL if the DataSet for this ImageTarget is currently active.
virtual bool destroyVirtualButton ( VirtualButton button)
pure virtual

Destroy one of this ImageTarget's virtual buttons.

Parameters
buttonThe virtual button to destroy.
Returns
true on success, or false on failure or if the DataSet for this ImageTarget is currently active.
virtual const char* getMetaData ( ) const
pure virtual

Get the meta data string for this ImageTarget.

A meta data string can be assigned to Cloud Recognition targets as part of the web interface or API. This method retrieves this string.

Returns
The meta data string associated with this ImageTarget (as set via the Cloud Recognition API). The string is empty for non Cloud Recognition targets.