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

#include <Leap.h>

Inheritance diagram for Leap::PointableList:

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

Public Member Functions

 PointableList (const ListBaseImplementation< Pointable > &)
 
LEAP_EXPORT PointableList ()
 
LEAP_EXPORT int count () const
 
LEAP_EXPORT bool isEmpty () const
 
LEAP_EXPORT bool empty () const
 
LEAP_EXPORT Pointable operator[] (int index) const
 
LEAP_EXPORT PointableListappend (const PointableList &other)
 
LEAP_EXPORT PointableListappend (const FingerList &other)
 
LEAP_EXPORT PointableListappend (const ToolList &other)
 
LEAP_EXPORT Pointable leftmost () const
 
LEAP_EXPORT Pointable rightmost () const
 
LEAP_EXPORT Pointable 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

◆ PointableList() [1/2]

Leap::PointableList::PointableList ( const ListBaseImplementation< Pointable > &  )

◆ PointableList() [2/2]

LEAP_EXPORT Leap::PointableList::PointableList ( )

Constructs an empty list of pointable entities.

Function details

◆ append() [1/3]

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

Appends the members of the specified FingerList to this PointableList.

Parameters
otherA FingerList object containing Finger objects to append to the end of this PointableList.

◆ append() [2/3]

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

Appends the members of the specified PointableList to this PointableList.

Parameters
otherA PointableList object containing Pointable objects to append to the end of this PointableList.

◆ append() [3/3]

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

Appends the members of the specified ToolList to this PointableList.

Parameters
otherA ToolList object containing Tool objects to append to the end of this PointableList.

◆ begin()

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

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

◆ count()

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

Returns the number of pointable entities in this list.

Returns
The number of pointable entities in this list.

◆ empty()

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

Deprecated. Use PointableList::isEmpty() instead.

See also
PointableList::isEmpty()

◆ end()

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

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

◆ frontmost()

LEAP_EXPORT Pointable Leap::PointableList::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 pointable, or invalid if list is empty.

◆ isEmpty()

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

Reports whether the list is empty.

Returns
True, if the list has no members.

◆ leftmost()

LEAP_EXPORT Pointable Leap::PointableList::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 pointable, or invalid if list is empty.

◆ operator[]()

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

◆ rightmost()

LEAP_EXPORT Pointable Leap::PointableList::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 pointable, or invalid if list is empty.