ToolListΒΆ
Methods:
The ToolList class represents a list of Tool objects.
Get a ToolList object by calling Frame::tools().
Leap::ToolList allToolsInFrame = frame.tools();Public Functions
- Since
- 1.0
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;
- Since
- 1.0
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;
- Since
- 1.0
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.
- Since
- 1.0
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.
- Since
- 1.0
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.
- Since
- 1.0
- 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.
- Since
- 1.0
ToolList()Constructs an empty list of tools.
- Since
- 1.0