#include <Leap.h>

The Tool class represents a tracked tool.
Tools are Pointable objects that the Leap 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.
 
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.
| Public Member Functions | |
| Tool (ToolImplementation *) | |
| LEAP_EXPORT | Tool () | 
| LEAP_EXPORT | Tool (const Pointable &) | 
| LEAP_EXPORT std::string | toString () const | 
|  Public Member Functions inherited from Leap::Pointable | |
| Pointable (PointableImplementation *) | |
| Pointable (FingerImplementation *) | |
| Pointable (ToolImplementation *) | |
| LEAP_EXPORT | Pointable () | 
| LEAP_EXPORT int32_t | id () const | 
| LEAP_EXPORT Frame | frame () const | 
| LEAP_EXPORT Hand | hand () const | 
| LEAP_EXPORT Vector | tipPosition () const | 
| LEAP_EXPORT Vector | tipVelocity () const | 
| LEAP_EXPORT Vector | direction () const | 
| LEAP_EXPORT float | width () const | 
| LEAP_EXPORT float | length () const | 
| LEAP_EXPORT bool | isFinger () const | 
| LEAP_EXPORT bool | isTool () const | 
| LEAP_EXPORT bool | isValid () const | 
| LEAP_EXPORT bool | operator== (const Pointable &) const | 
| LEAP_EXPORT bool | operator!= (const Pointable &) const | 
| LEAP_EXPORT std::string | toString () const | 
| Static Public Member Functions | |
| static LEAP_EXPORT const Tool & | invalid () | 
|  Static Public Member Functions inherited from Leap::Pointable | |
| static LEAP_EXPORT const Pointable & | invalid () | 
| Additional Inherited Members | |
|  Protected Attributes inherited from Leap::Interface | |
| class SharedObject * | m_object | 
|  Protected Member Functions inherited from Leap::Interface | |
| LEAP_EXPORT | Interface (void *owner) | 
| LEAP_EXPORT | Interface (Implementation *reference, void *owner) | 
| LEAP_EXPORT | Interface (const Interface &rhs) | 
| LEAP_EXPORT Interface & | operator= (const Interface &rhs) | 
| virtual LEAP_EXPORT | ~Interface () | 
| template<typename T > | |
| T * | get () const | 
| Leap::Tool::Tool | ( | ToolImplementation * | ) | 
| LEAP_EXPORT Leap::Tool::Tool | ( | ) | 
| 
 | explicit | 
| 
 | 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.)