Methods:
The ToolList class represents a list of Tool objects.
Leap::ToolList allToolsInFrame = frame.tools();Public Functions
const_iterator begin()The C++ iterator set to the beginning of this ToolList.
Leap::ToolList tools = frame.tools(); for(Leap::ToolList::const_iterator tl = tools.begin(); tl != tools.end(); tl++) std::cout << *tl << std::endl;int count()const_iterator end()The C++ iterator set to the end of this ToolList.
Leap::ToolList tools = frame.tools(); for(Leap::ToolList::const_iterator tl = tools.begin(); tl != tools.end(); tl++) std::cout << *tl << std::endl;Tool frontmost()The member of the list that is farthest to the front within the standard Leap Motion frame of reference (i.e has the smallest Z coordinate).
Leap::Tool frontmostTool = frame.tools().frontmost();
- Return
- The frontmost tool, or invalid if list is empty.
bool isEmpty()Tool leftmost()The member of the list that is farthest to the left within the standard Leap Motion frame of reference (i.e has the smallest X coordinate).
Leap::Tool leftmostTool = frame.tools().leftmost();
- Return
- The leftmost tool, or invalid if list is empty.
Tool operator[](int index)Access a list member by its position in the list.
Leap::ToolList allTools = frame.tools(); for (int index = 0; index < allTools.count(); index++) { std::cout << allTools[index] << std::endl; }
- Return
- The Tool object at the specified index.
- Parameters
- index -
The zero-based list position index.
Tool rightmost()The member of the list that is farthest to the right within the standard Leap Motion frame of reference (i.e has the largest X coordinate).
Leap::Tool rightmostTool = frame.tools().rightmost();
- Return
- The rightmost tool, or invalid if list is empty.
ToolList()Constructs an empty list of tools.