Documentation
The Tool class represents a tracked tool. More...
Inherits com.leapmotion.leap.Pointable.
Public Member Functions | |
| Tool () | |
| Constructs a Tool object. |
|
| Tool (Pointable arg0) | |
| If the specified Pointable object represents a tool, creates a copy of it as a Tool object; otherwise, creates an invalid Tool object. |
|
| String | toString () |
| A string containing a brief, human readable description of the Tool object. |
|
Public Member Functions inherited from com.leapmotion.leap.Pointable
| |
| Vector | direction () |
| The direction in which this finger or tool is pointing. |
|
| boolean | equals (Pointable arg0) |
| Compare Pointable object equality. |
|
| Frame | frame () |
| The Frame associated with this Pointable object. |
|
| Hand | hand () |
| The Hand associated with this finger or tool. |
|
| int | id () |
| A unique ID assigned to this Pointable object, whose value remains the same across consecutive frames while the tracked finger or tool remains visible. |
|
| boolean | isFinger () |
| Whether or not the Pointable is believed to be a finger. |
|
| boolean | isTool () |
| Whether or not the Pointable is believed to be a tool. |
|
| boolean | isValid () |
| Reports whether this is a valid Pointable object. |
|
| float | length () |
| The estimated length of the finger or tool in millimeters. |
|
| Pointable () | |
| Constructs a Pointable object. |
|
| Vector | stabilizedTipPosition () |
| The stabilized tip position of this Pointable. |
|
| float | timeVisible () |
| The duration of time this Pointable has been visible to the Leap Motion Controller. |
|
| Vector | tipPosition () |
| The tip position in millimeters from the Leap Motion origin. |
|
| Vector | tipVelocity () |
| The rate of change of the tip position in millimeters/second. |
|
| String | toString () |
| A string containing a brief, human readable description of the Pointable object. |
|
| float | touchDistance () |
| A value proportional to the distance between this Pointable object and the adaptive touch plane. |
|
| Pointable.Zone | touchZone () |
| The current touch zone of this Pointable object. |
|
| float | width () |
| The estimated width of the finger or tool in millimeters. |
|
Static Public Member Functions | |
| static Tool | invalid () |
| Returns an invalid Tool object. |
|
Static Public Member Functions inherited from com.leapmotion.leap.Pointable
| |
| static Pointable | invalid () |
| Returns an invalid Pointable object. |
|
Detailed Description
The Tool class represents a tracked tool.
Tools are Pointable objects that the Leap Motion software has classified as a tool. Tools are longer, thinner, and straighter than a typical finger. Get valid Tool objects from a Frame or a Hand object.
Tools may reference a hand, but unlike fingers they are not permanently associated. Instead, a tool can be transferred between hands while keeping the same ID.
Note that Tool objects can be invalid, which means that they do not contain valid tracking data and do not correspond to a physical tool. Invalid Tool objects can be the result of asking for a Tool object using an ID from an earlier frame when no Tool objects with that ID exist in the current frame. A Tool object created from the Tool constructor is also invalid. Test for validity with the Tool::isValid() function.
- Since
- 1.0
Constructor & Destructor Documentation
| com.leapmotion.leap.Tool.Tool | ( | ) |
| com.leapmotion.leap.Tool.Tool | ( | Pointable | arg0 | ) |
Member Function Documentation
|
static |
Returns an invalid Tool object.
You can use the instance returned by this function in comparisons testing whether a given Tool instance is valid or invalid. (You can also use the Tool::isValid() function.)
- Returns
- The invalid Tool instance.
- Since
- 1.0
Public Member Functions inherited from