Leap C++ API Reference  0.7.9
Leap::FingerList Class Reference

The FingerList class represents a list of Finger objects. More...

Inherits Leap::Interface.

Public Types

typedef ConstListIterator
< FingerList, Finger
const_iterator
 A C++ iterator type for FingerList objects.
 

Public Member Functions

FingerListappend (const FingerList &other)
 Appends the members of the specifed FingerList to this FingerList.
 
const_iterator begin () const
 The C++ iterator set to the beginning of this FingerList.
 
int count () const
 Returns the number of fingers in this list.
 
bool empty () const
 Deprecated.
 
const_iterator end () const
 The C++ iterator set to the end of this FingerList.
 
 FingerList ()
 Constructs an empty list of fingers.
 
Finger frontmost () const
 The member of the list that is farthest to the front within the standard Leap frame of reference (i.e has the smallest Z coordinate).
 
bool isEmpty () const
 Reports whether the list is empty.
 
Finger leftmost () const
 The member of the list that is farthest to the left within the standard Leap frame of reference (i.e has the smallest X coordinate).
 
Finger operator[] (int index) const
 Access a list member by its position in the list.
 
Finger rightmost () const
 The member of the list that is farthest to the right within the standard Leap frame of reference (i.e has the largest X coordinate).
 

Detailed Description

The FingerList class represents a list of Finger objects.

Get a FingerList object by calling Frame::fingers().

Member Typedef Documentation

typedef ConstListIterator<FingerList, Finger> Leap::FingerList::const_iterator

A C++ iterator type for FingerList objects.

Constructor & Destructor Documentation

Leap::FingerList::FingerList ( )

Constructs an empty list of fingers.

Member Function Documentation

FingerList& Leap::FingerList::append ( const FingerList other)

Appends the members of the specifed FingerList to this FingerList.

Parameters
otherA FingerList object containing Finger objects to append to the end of this FingerList.
const_iterator Leap::FingerList::begin ( ) const

The C++ iterator set to the beginning of this FingerList.

int Leap::FingerList::count ( ) const

Returns the number of fingers in this list.

Returns
The number of fingers in this list.
bool Leap::FingerList::empty ( ) const

Deprecated.

Use FingerList::isEmpty() instead.

See Also
FingerList::isEmpty()
const_iterator Leap::FingerList::end ( ) const

The C++ iterator set to the end of this FingerList.

Finger Leap::FingerList::frontmost ( ) const

The member of the list that is farthest to the front within the standard Leap frame of reference (i.e has the smallest Z coordinate).

Returns
The frontmost finger, or invalid if list is empty.
bool Leap::FingerList::isEmpty ( ) const

Reports whether the list is empty.

Returns
True, if the list has no members.
Finger Leap::FingerList::leftmost ( ) const

The member of the list that is farthest to the left within the standard Leap frame of reference (i.e has the smallest X coordinate).

Returns
The leftmost finger, or invalid if list is empty.
Finger Leap::FingerList::operator[] ( int  index) const

Access a list member by its position in the list.

Parameters
indexThe zero-based list position index.
Returns
The Finger object at the specified index.
Finger Leap::FingerList::rightmost ( ) const

The member of the list that is farthest to the right within the standard Leap frame of reference (i.e has the largest X coordinate).

Returns
The rightmost finger, or invalid if list is empty.