ToolΒΆ

The Tool class represents a tracked tool. More...

Inherits Pointable.

Public Member Functions

 Tool ()
 Constructs a Tool object. More...
 
 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. More...
 
String toString ()
 A string containing a brief, human readable description of the Tool object. More...
 
- Public Member Functions inherited from Pointable
Vector direction ()
 The direction in which this finger is pointing. More...
 
boolean equals (Pointable arg0)
 Compare Pointable object equality. More...
 
Frame frame ()
 The Frame associated with this Pointable object. More...
 
Hand hand ()
 The Hand associated with a finger. More...
 
int id ()
 A unique ID assigned to this Pointable object, whose value remains the same across consecutive frames while the tracked finger remains visible. More...
 
boolean isExtended ()
 Whether or not this Pointable is in an extended posture. More...
 
boolean isFinger ()
 Whether or not this Pointable is classified as a finger. More...
 
boolean isTool ()
 Whether or not this Pointable is classified as a tool. More...
 
boolean isValid ()
 Reports whether this is a valid Pointable object. More...
 
float length ()
 The estimated length of the finger in millimeters. More...
 
 Pointable ()
 Constructs a Pointable object. More...
 
Vector stabilizedTipPosition ()
 The stabilized tip position of this Pointable. More...
 
float timeVisible ()
 The duration of time this Pointable has been visible to the Leap Motion Controller. More...
 
Vector tipPosition ()
 The tip position in millimeters from the Leap Motion origin. More...
 
Vector tipVelocity ()
 The rate of change of the tip position in millimeters/second. More...
 
String toString ()
 A string containing a brief, human readable description of the Pointable object. More...
 
float touchDistance ()
 A value proportional to the distance between this Pointable object and the adaptive touch plane. More...
 
Pointable.Zone touchZone ()
 The current touch zone of this Pointable object. More...
 
float width ()
 The estimated width of the finger in millimeters. More...
 

Static Public Member Functions

static Tool invalid ()
 Returns an invalid Tool object. More...
 
- Static Public Member Functions inherited from Pointable
static Pointable invalid ()
 Returns an invalid Pointable object. More...
 

Detailed Description

The Tool class represents a tracked tool.

Leap_Tool.png
Deprecated:
3.0

Constructor & Destructor Documentation

Tool ( )

Constructs a Tool object.

Tool frontTool = frame.tools().frontmost();
Tool firstToolInList = frame.tools().get(0);
Deprecated:
3.0
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.

if (pointable.isTool()) {
Tool toolFromPointable = new Tool(pointable);
}
Deprecated:
3.0

Member Function Documentation

static Tool invalid ( )
static

Returns an invalid Tool object.

if (!tool.equals(Tool.invalid())) {
//Handle valid tool data
}
Returns
The invalid Tool instance.
Deprecated:
3.0
String toString ( )

A string containing a brief, human readable description of the Tool object.

Returns
A description of the Tool object as a string.
Deprecated:
3.0