Methods:
The HandList class represents a list of Hand objects.
Get a HandList object by calling Frame::hands().
Leap::HandList allHands = frame.hands();Public Functions
- Since
- 1.0
const_iterator begin()The C++ iterator set to the beginning of this HandList.
Leap::HandList hands = frame.hands(); for(Leap::HandList::const_iterator hl = hands.begin(); hl != hands.end(); hl++) std::cout << *hl << std::endl;
- Since
- 1.0
int count()const_iterator end()The C++ iterator set to the end of this HandList.
Leap::HandList hands = frame.hands(); for(Leap::HandList::const_iterator hl = hands.begin(); hl != hands.end(); hl++) std::cout << *hl << std::endl;
- Since
- 1.0
Hand 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::Hand frontHand = frame.hands().frontmost();
- Return
- The frontmost hand, or invalid if list is empty.
- Since
- 1.0
HandList()Constructs an empty list of hands.
- Since
- 1.0
bool isEmpty()Hand 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).
Note: to determine whether a hand is the left hand, use the Hand::isLeft() function.
Leap::Hand furthestLeft = frame.hands().leftmost();
- Return
- The leftmost hand, or invalid if list is empty.
- Since
- 1.0
Hand operator[](int index)Access a list member by its position in the list.
Leap::Hand firstInList = frame.hands()[0];
- Return
- The Hand object at the specified index.
- Since
- 1.0
- Parameters
- index -
The zero-based list position index.
Hand 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).
Note: to determine whether a hand is the right hand, use the Hand::isRight() function.
Leap::Hand furthestRight = frame.hands().rightmost();
- Return
- The rightmost hand, or invalid if list is empty.
- Since
- 1.0