Tracking ModelΒΆ

The Leap Motion API defines a class representing each of the primary tracked objects.

Frame HandList Hand FingerList PointableList Finger Pointable Bone ImageList Image Arm

The Frame object is essentially the root of the data model and provides access to all the tracked entities. A new Frame is created at each update interval.

The frame contains lists of the hands and fingers tracked in that frame. (You can also get the fingers for a specific hand from the relevant Hand object.)

controller = Leap.Controller()
# wait until Controller.isConnected() evaluates to true

frame = controller.frame()
hands = frame.hands
pointables = frame.pointables
fingers = frame.fingers
tools =

See Frames


The Hand object describes the position and orientation of a hand, tracks its motion between frames and contains lists of the fingers associated with that hand.

# hand is a Leap.Hand object
pointables = hand.pointables
fingers = hand.fingers

See Hands

Arm Arm objects describe the position, direction, and orientation of the arm to which a hand is attached. Arms can only be accessed through the Hand object.
Pointable, Finger

Pointable objects define the basic characteristics common to fingers. The Finger class extends Pointable with additional information specific to those entities.

if (pointable.is_tool):
    tool = Leap.Tool(pointable)
    finger = Leap.Finger(pointable)

See Fingers

Bone Bone object represent the position and orientation of a bone. The tracked bones include the metarcarpals and phalanges of the fingers (and thumb).
Image Image objects provide the raw sensor data and calibration grid for the Leap Motion cameras. (Not available through the WebSocket server.)
Utility Classes

The Vector class describes points and directions. The Vector class also provides several useful math functions for working with vectors.

Likewise, the Matrix class represents things like rotations and other transforms returned by some functions in the API.

The InteractionBox class provides functions to help map a rectilinear portion of the Leap Motion controller’s field of view to either 2D screen space or 3D space. See Leap_Touch_Emulation.