ToolΒΆ

Methods:

class Leap::Tool

The Tool class represents a tracked tool.

https://di4564baj7skl.cloudfront.net/documentation/v2/images/Leap_Tool.png

Public Functions

Tool()

Constructs a Tool object.

Leap::Tool frontTool = frame.tools().frontmost();

Tool(const Pointable &)

If the specified Pointable object represents a tool, creates a copy of it as a Tool object; otherwise, creates an invalid Tool object.

Leap::Tool tool = Leap::Tool::invalid();
if (pointable.isTool()) {
    tool = Leap::Tool(pointable);
}

std::string toString()

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

Return
A description of the Tool object as a string.

Public Static Functions

const Tool & invalid()

Returns an invalid Tool object.

if (tool != Leap::Tool::invalid()) {
    //Handle valid tool data
}

Return
The invalid Tool instance.