SOFA plugin: LeapMotion  master
Open source framework for multi-physics simuation
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Leap::HandList Class Reference

#include <Leap.h>

Inheritance diagram for Leap::HandList:

Detailed Description

The HandList class represents a list of Hand objects.

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

Public Member Functions

 HandList (const ListBaseImplementation< Hand > &)
 
LEAP_EXPORT HandList ()
 
LEAP_EXPORT int count () const
 
LEAP_EXPORT bool isEmpty () const
 
LEAP_EXPORT bool empty () const
 
LEAP_EXPORT Hand operator[] (int index) const
 
LEAP_EXPORT HandListappend (const HandList &other)
 
LEAP_EXPORT Hand leftmost () const
 
LEAP_EXPORT Hand rightmost () const
 
LEAP_EXPORT Hand frontmost () const
 
LEAP_EXPORT const_iterator begin () const
 
LEAP_EXPORT const_iterator end () const
 

Additional Inherited Members

- Protected Attributes inherited from Leap::Interface
class SharedObject * m_object
 
- Protected Member Functions inherited from Leap::Interface
LEAP_EXPORT Interface (void *owner)
 
LEAP_EXPORT Interface (Implementation *reference, void *owner)
 
LEAP_EXPORT Interface (const Interface &rhs)
 
LEAP_EXPORT Interfaceoperator= (const Interface &rhs)
 
virtual LEAP_EXPORT ~Interface ()
 
template<typename T >
T * get () const
 

Constructor details

◆ HandList() [1/2]

Leap::HandList::HandList ( const ListBaseImplementation< Hand > &  )

◆ HandList() [2/2]

LEAP_EXPORT Leap::HandList::HandList ( )

Constructs an empty list of hands.

Function details

◆ append()

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

Appends the members of the specified HandList to this HandList.

Parameters
otherA HandList object containing Hand objects to append to the end of this HandList.

◆ begin()

LEAP_EXPORT const_iterator Leap::HandList::begin ( ) const

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

◆ count()

LEAP_EXPORT int Leap::HandList::count ( ) const

Returns the number of hands in this list.

Returns
The number of hands in this list.

◆ empty()

LEAP_EXPORT bool Leap::HandList::empty ( ) const

Deprecated. Use HandList::isEmpty() instead.

See also
HandList::isEmpty()

◆ end()

LEAP_EXPORT const_iterator Leap::HandList::end ( ) const

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

◆ frontmost()

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

◆ isEmpty()

LEAP_EXPORT bool Leap::HandList::isEmpty ( ) const

Reports whether the list is empty.

Returns
True, if the list has no members.

◆ leftmost()

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

◆ operator[]()

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

◆ rightmost()

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