PointableListΒΆ

Methods:

class com::leapmotion::leap::PointableList

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() or Hand::pointables().

PointableList inFrame = frame.pointables();
PointableList onHand = hand.pointables();

Since
1.0

Public Functions

Appends the members of the specified PointableList to this PointableList.

Since
1.0
Parameters

Appends the members of the specified FingerList to this PointableList.

Since
1.0
Parameters

PointableList append(ToolList other)

Appends the members of the specified ToolList to this PointableList.

Parameters

int count()

Returns the number of pointable entities in this list.

for (int p = 0; p < frame.pointables().count(); p++) {
    System.out.println(frame.pointables().get(p));
}

Return
The number of pointable entities in this list.
Since
1.0

PointableList extended()

Returns a new list containing those members of the current list that are extended.

This includes all tools and any fingers whose isExtended() function is true.

Return
The list of tools and extended fingers from the current list.
Since
2.0

Pointable frontmost()

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

Pointable furthestFront = frame.pointables().frontmost();

Return
The frontmost pointable, or invalid if list is empty.
Since
1.0

Pointable get(int index)

Access a list member by its position in the list.

PointableList pointablesOfHand = hand.pointables();
for (int index = 0; index < pointablesOfHand.count(); index++) {
    System.out.println(pointablesOfHand.get(index));
}

Return
The Pointable object at the specified index.
Since
1.0
Parameters
  • index -

    The zero-based list position index.

boolean isEmpty()

Reports whether the list is empty.

if(!hand.pointables().isEmpty()){
    //Process this hand's pointables
}

Return
True, if the list has no members.
Since
1.0

Pointable leftmost()

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 leftmostInFrame = frame.pointables().leftmost();

Return
The leftmost pointable, or invalid if list is empty.
Since
1.0

PointableList()

Constructs an empty list of pointable entities.

Since
1.0

Pointable rightmost()

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

Pointable rightmostInFrame = frame.pointables().rightmost();

Return
The rightmost pointable, or invalid if list is empty.
Since
1.0

class PointableListIterator