C++ Java Unity
C++ Reference
VirtualButton Class Referenceabstract

Detailed Description

A virtual button on a Trackable.

Methods to modify a VirtualButton must not be called while the corresponding DataSet is active. The DataSet must be deactivated before reconfiguring a VirtualButton.

Inheritance diagram for VirtualButton:
NonCopyable

Public Types

enum  SENSITIVITY {
  HIGH,
  MEDIUM,
  LOW
}
 Sensitivity of press detection. More...
 

Public Member Functions

virtual bool setArea (const Area &area)=0
 Defines a new area for the button area in meters. The coordinate system is local to the ImageTarget. More...
 
virtual const AreagetArea () const =0
 Returns the currently set Area. More...
 
virtual bool setSensitivity (SENSITIVITY sensitivity)=0
 Sets the sensitivity of the virtual button. More...
 
virtual bool setEnabled (bool enabled)=0
 Enables or disables a virtual button. More...
 
virtual bool isEnabled () const =0
 Returns true if the virtual button is active (updates while tracking). More...
 
virtual const char * getName () const =0
 Returns the name of the button as ASCII string. More...
 
virtual int getID () const =0
 Returns a unique id for this virtual button. More...
 

Protected Member Functions

virtual ~VirtualButton ()
 

Member Enumeration Documentation

Sensitivity of press detection.

Enumerator
HIGH 

Fast detection.

MEDIUM 

Balanced between fast and robust.

LOW 

Robust detection.

Constructor & Destructor Documentation

virtual ~VirtualButton ( )
inlineprotectedvirtual

Member Function Documentation

virtual bool setArea ( const Area area)
pure virtual

Defines a new area for the button area in meters. The coordinate system is local to the ImageTarget.

This method must not be called while the corresponding DataSet is active or it will return false.

virtual const Area& getArea ( ) const
pure virtual

Returns the currently set Area.

virtual bool setSensitivity ( SENSITIVITY  sensitivity)
pure virtual

Sets the sensitivity of the virtual button.

Sensitivity allows deciding between fast and robust button press measurements. This method must not be called while the corresponding DataSet is active or it will return false.

virtual bool setEnabled ( bool  enabled)
pure virtual

Enables or disables a virtual button.

This method must not be called while the corresponding DataSet is active or it will return false.

virtual bool isEnabled ( ) const
pure virtual

Returns true if the virtual button is active (updates while tracking).

virtual const char* getName ( ) const
pure virtual

Returns the name of the button as ASCII string.

virtual int getID ( ) const
pure virtual

Returns a unique id for this virtual button.