Methods:
The FingerList class represents a list of Finger objects.
Get a FingerList object by calling Frame::fingers().
Leap::FingerList allFingers = frame.fingers();Public Functions
- Since
- 1.0
FingerList & append(const FingerList & other)Appends the members of the specified FingerList to this FingerList.
- Since
- 1.0
- Parameters
- other -
A FingerList object containing Finger objects to append to the end of this FingerList.
const_iterator begin()The C++ iterator set to the beginning of this FingerList.
Leap::FingerList allTheFingers = frame.fingers(); for(Leap::FingerList::const_iterator fl = allTheFingers.begin(); fl != allTheFingers.end(); fl++) std::cout << "Finger ID: " << (*fl).id() << std::endl;
- Since
- 1.0
int count()const_iterator end()The C++ iterator set to the end of this FingerList.
Leap::FingerList fingersInFrame = frame.fingers(); for(Leap::FingerList::const_iterator fl = fingersInFrame.begin(); fl != fingersInFrame.end(); fl++) std::cout << *fl << std::endl;
- Since
- 1.0
FingerList extended()Returns a new list containing those fingers in the current list that are extended.
Leap::FingerList extendedFingerList = hand.fingers().extended();
- Return
- The list of extended fingers from the current list.
- Since
- 2.0
FingerList()Constructs an empty list of fingers.
- Since
- 1.0
FingerList fingerType(Finger::Type type)Returns a list containing fingers from the current list of a given finger type by modifying the existing list.
Leap::FingerList indexFingerList = hand.fingers().fingerType(Leap::Finger::TYPE_INDEX); Leap::Finger indexFinger = indexFingerList[0]; //since there is only one per hand
- Return
- The list of matching fingers from the current list.
- Since
- 2.0
Finger 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::Finger mostForwardFinger = frame.fingers().frontmost();
- Return
- The frontmost finger, or invalid if list is empty.
- Since
- 1.0
bool isEmpty()Finger 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::Finger fingerWithSmallestX = frame.fingers().leftmost();
- Return
- The leftmost finger, or invalid if list is empty.
- Since
- 1.0
Finger operator[](int index)Access a list member by its position in the list.
Leap::Finger firstFingerInList = frame.fingers()[0];
- Return
- The Finger object at the specified index.
- Since
- 1.0
- Parameters
- index -
The zero-based list position index.
Finger 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::Finger fingerWithLargestX = frame.fingers().rightmost();
- Return
- The rightmost finger, or invalid if list is empty.
- Since
- 1.0