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

#include <Leap.h>

Inheritance diagram for Leap::ToolList:

Detailed Description

The ToolList class represents a list of Tool objects.

Get a ToolList object by calling Frame::tools().

Public Member Functions

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

◆ ToolList() [1/2]

Leap::ToolList::ToolList ( const ListBaseImplementation< Tool > &  )

◆ ToolList() [2/2]

LEAP_EXPORT Leap::ToolList::ToolList ( )

Constructs an empty list of tools.

Function details

◆ append()

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

Appends the members of the specified ToolList to this ToolList.

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

◆ begin()

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

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

◆ count()

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

Returns the number of tools in this list.

Returns
The number of tools in this list.

◆ empty()

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

Deprecated. Use ToolList::isEmpty() instead.

See also
ToolList::isEmpty()

◆ end()

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

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

◆ frontmost()

LEAP_EXPORT Tool Leap::ToolList::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 tool, or invalid if list is empty.

◆ isEmpty()

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

Reports whether the list is empty.

Returns
True, if the list has no members.

◆ leftmost()

LEAP_EXPORT Tool Leap::ToolList::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 tool, or invalid if list is empty.

◆ operator[]()

LEAP_EXPORT Tool Leap::ToolList::operator[] ( int  index) const

Access a list member by its position in the list.

Parameters
indexThe zero-based list position index.
Returns
The Tool object at the specified index.

◆ rightmost()

LEAP_EXPORT Tool Leap::ToolList::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 tool, or invalid if list is empty.