Methods:
The LeapPointableOrHandList category provides methods for getting objects from an NSArray containing LeapPointable, LeapFinger, or LeapHand objects based on their physical position within the Leap coordinate system.
LeapFinger *farLeft = frame.fingers.leftmost; LeapFinger *mostForwardOnHand = ((LeapHand*)[frame.hands objectAtIndex:0]).fingers.frontmost; LeapTool *rightTool = frame.tools.rightmost;Public Functions
- Since 1.0
- (NSArray *) extendedReturns a new list containing those members of the current list that are extended.
This includes all tools and any fingers whose [LeapPointable isExtended] function is true. Unlike its C++ counterpart, this method does not modify the original NSArray.
NSArray *fingerList = frame.fingers; NSArray *extendedFingers = [fingerList extended];
- Return
- The list of tools and extended fingers from the current list.
- Since 2.0
- (NSArray *) fingerType:(LeapFingerType) typeReturns a new list containing those Pointable objects in the current list that are of the specified finger type.
NSArray *allFingers = frame.fingers; NSArray *indexFingers = [allFingers fingerType:LEAP_FINGER_TYPE_INDEX];
- Return
- The list of matching fingers from the current list.
- Since 2.0
- (id) frontmostThe member of the list that is farthest to the front within the standard Leap frame of reference (i.e has the smallest Z coordinate).
LeapHand *frontmostHand = handList.frontmost; LeapFinger *frontmostFinger = frontmostHand.fingers.frontmost;Returns nil if the NSArray is empty.
- Since 1.0
- (id) leftmostThe member of the list that is farthest to the left within the standard Leap frame of reference (i.e has the smallest X coordinate).
LeapHand *leftmostHand = handList.leftmost; LeapFinger *leftmostFinger = leftmostHand.fingers.leftmost;Returns nil if the NSArray is empty.
- Since 1.0
- (id) rightmostThe member of the list that is farthest to the right within the standard Leap frame of reference (i.e has the largest X coordinate).
LeapHand *rightmostHand = handList.rightmost; LeapFinger *rightmostFinger = rightmostHand.fingers.rightmost;Returns nil if the NSArray is empty.
- Since 1.0