Leap Motion C++ API Reference  0.8.0
Leap::PointableList Class Reference

The PointableList class represents a list of Pointable objects. More...

Inherits Leap::Interface.

Public Types

typedef ConstListIterator
< PointableList, Pointable
const_iterator
 A C++ iterator type for PointableList objects.
 

Public Member Functions

PointableListappend (const PointableList &other)
 Appends the members of the specifed PointableList to this PointableList.
 
PointableListappend (const FingerList &other)
 Appends the members of the specifed FingerList to this PointableList.
 
PointableListappend (const ToolList &other)
 Appends the members of the specifed ToolList to this PointableList.
 
const_iterator begin () const
 The C++ iterator set to the beginning of this PointableList.
 
int count () const
 Returns the number of pointable entities in this list.
 
bool empty () const
 Deprecated.
 
const_iterator end () const
 The C++ iterator set to the end of this PointableList.
 
Pointable frontmost () const
 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).
 
bool isEmpty () const
 Reports whether the list is empty.
 
Pointable leftmost () const
 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).
 
Pointable operator[] (int index) const
 Access a list member by its position in the list.
 
 PointableList ()
 Constructs an empty list of pointable entities.
 
Pointable rightmost () const
 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).
 

Detailed Description

The PointableList class represents a list of Pointable objects.

Pointable objects include entities that can be pointed, such as fingers and tools.

Get a PointableList object by calling Frame::pointables().

Member Typedef Documentation

A C++ iterator type for PointableList objects.

Constructor & Destructor Documentation

Leap::PointableList::PointableList ( )

Constructs an empty list of pointable entities.

Member Function Documentation

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

Appends the members of the specifed PointableList to this PointableList.

Parameters
otherA PointableList object containing Pointable objects to append to the end of this PointableList.
PointableList& Leap::PointableList::append ( const FingerList other)

Appends the members of the specifed FingerList to this PointableList.

Parameters
otherA FingerList object containing Finger objects to append to the end of this PointableList.
PointableList& Leap::PointableList::append ( const ToolList other)

Appends the members of the specifed ToolList to this PointableList.

Parameters
otherA ToolList object containing Tool objects to append to the end of this PointableList.
const_iterator Leap::PointableList::begin ( ) const

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

int Leap::PointableList::count ( ) const

Returns the number of pointable entities in this list.

Returns
The number of pointable entities in this list.
bool Leap::PointableList::empty ( ) const

Deprecated.

Use PointableList::isEmpty() instead.

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

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

Pointable Leap::PointableList::frontmost ( ) const

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).

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

Reports whether the list is empty.

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

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).

Returns
The leftmost pointable, or invalid if list is empty.
Pointable Leap::PointableList::operator[] ( int  index) const

Access a list member by its position in the list.

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

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).

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