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

The HandList class represents a list of Hand objects. More...

Inherits Leap::Interface.

Public Types

typedef ConstListIterator
< HandList, Hand
const_iterator
 A C++ iterator type for this HandList objects.
 

Public Member Functions

HandListappend (const HandList &other)
 Appends the members of the specifed HandList to this HandList.
 
const_iterator begin () const
 The C++ iterator set to the beginning of this HandList.
 
int count () const
 Returns the number of hands in this list.
 
bool empty () const
 Deprecated.
 
const_iterator end () const
 The C++ iterator set to the end of this HandList.
 
Hand 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).
 
 HandList ()
 Constructs an empty list of hands.
 
bool isEmpty () const
 Reports whether the list is empty.
 
Hand 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).
 
Hand operator[] (int index) const
 Access a list member by its position in the list.
 
Hand 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 HandList class represents a list of Hand objects.

Get a HandList object by calling Frame::hands().

Member Typedef Documentation

typedef ConstListIterator<HandList, Hand> Leap::HandList::const_iterator

A C++ iterator type for this HandList objects.

Constructor & Destructor Documentation

Leap::HandList::HandList ( )

Constructs an empty list of hands.

Member Function Documentation

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

Appends the members of the specifed HandList to this HandList.

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

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

int Leap::HandList::count ( ) const

Returns the number of hands in this list.

Returns
The number of hands in this list.
bool Leap::HandList::empty ( ) const

Deprecated.

Use HandList::isEmpty() instead.

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

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

Hand Leap::HandList::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 hand, or invalid if list is empty.
bool Leap::HandList::isEmpty ( ) const

Reports whether the list is empty.

Returns
True, if the list has no members.
Hand Leap::HandList::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 hand, or invalid if list is empty.
Hand Leap::HandList::operator[] ( int  index) const

Access a list member by its position in the list.

Parameters
indexThe zero-based list position index.
Returns
The Hand object at the specified index.
Hand Leap::HandList::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 hand, or invalid if list is empty.