ToolListΒΆ
Methods:
The ToolList class represents a list of Tool objects.
Get a ToolList object by calling Frame::tools().
ToolList allToolsInFrame = frame.tools();Public Functions
- Since
- 1.0
int count()Returns the number of tools in this list.
if (frame.tools().count() > 0) { //Process tools }
- Return
- The number of tools in this list.
- 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).
Tool frontmostTool = frame.tools().frontmost();
- Return
- The frontmost tool, or invalid if list is empty.
- Since
- 1.0
Tool get(int index)Access a list member by its position in the list.
ToolList allToolsinFrame = frame.tools(); for (int index = 0; index < allToolsinFrame.count(); index++) { System.out.println(allToolsinFrame.get(index)); }
- Return
- The Tool object at the specified index.
- Since
- 1.0
- Parameters
- index -
The zero-based list position index.
boolean isEmpty()Reports whether the list is empty.
if(!frame.tools().isEmpty()){ //Process this frame's tools }
- Return
- True, if the list has no members.
- Since
- 1.0
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).
Tool leftmostTool = frame.tools().leftmost();
- Return
- The leftmost tool, or invalid if list is empty.
- Since
- 1.0
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).
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
class ToolListIterator