Leap.CircleGesture |
The CircleGesture classes represents a circular finger movement. A circle movement is recognized when the tip of a finger draws a circle within the Leap field of view. Circle gestures are continuous. The CircleGesture objects for the gesture have three possible states:
|
Leap.Controller |
The Controller class is your main interface to the Leap Motion Controller. Create an instance of this Controller class to access frames of tracking data and configuration information. Frame data can be polled at any time using the Controller.frame() function. Call frame() or frame(0) to get the most recent frame. Set the history parameter to a positive integer to access previous frames. A controller stores up to 60 frames in its frame history. Polling is an appropriate strategy for applications which already have an intrinsic update loop, such as a game. |
Leap.Frame |
The Frame class represents a set of hand and finger tracking data detected in a single frame. The Leap detects hands, fingers and tools within the tracking area, reporting their positions, orientations and motions in frames at the Leap frame rate. Access Frame objects using the Controller.frame() function. |
Leap.Gesture |
The Gesture class represents a recognized movement by the user. The Leap watches the activity within its field of view for certain movement patterns typical of a user gesture or command. For example, a movement from side to side with the hand can indicate a swipe gesture, while a finger poking forward can indicate a screen tap gesture. When the Leap recognizes a gesture, it assigns an ID and adds a Gesture object to the frame gesture list. For continuous gestures, which occur over many frames, the Leap updates the gesture by adding a Gesture object having the same ID and updated properties in each subsequent frame. Important: Recognition for each type of gesture must be enabled; otherwise no gestures are recognized or reported. Subclasses of Gesture define the properties for the specific movement patterns recognized by the Leap. The Gesture subclasses for include:
Circle and swipe gestures are continuous and these objects can have a state of start, update, and stop. The screen tap gesture is a discrete gesture. The Leap only creates a single ScreenTapGesture object appears for each tap and it always has a stop state. Get valid Gesture instances from a Frame object. You can get a list of gestures from the Frame gestures array. You can also use the Frame gesture() method to find a gesture in the current frame using an ID value obtained in a previous frame. Gesture objects can be invalid. For example, when you get a gesture by ID using Frame.gesture(), and there is no gesture with that ID in the current frame, then gesture() returns an Invalid Gesture object (rather than a null value). Always check object validity in situations where a gesture might be invalid. |
Leap.Hand |
The Hand class reports the physical characteristics of a detected hand. Hand tracking data includes a palm position and velocity; vectors for the palm normal and direction to the fingers; properties of a sphere fit to the hand; and lists of the attached fingers and tools. Note that Hand objects can be invalid, which means that they do not contain valid tracking data and do not correspond to a physical entity. Invalid Hand objects can be the result of asking for a Hand object using an ID from an earlier frame when no Hand objects with that ID exist in the current frame. A Hand object created from the Hand constructor is also invalid. Test for validity with the Hand.valid property. |
Leap.KeyTapGesture |
The KeyTapGesture class represents a tapping gesture by a finger or tool. A key tap gesture is recognized when the tip of a finger rotates down toward the palm and then springs back to approximately the original postion, as if tapping. The tapping finger must pause briefly before beginning the tap. Key tap gestures are discrete. The KeyTapGesture object representing a tap always has the state, STATE_STOP. Only one KeyTapGesture object is created for each key tap gesture recognized. |
Leap.Matrix |
The Matrix object represents a transformation matrix. To use this object to transform a Vector, construct a matrix containing the desired transformation and then use the Matrix.transformPoint() or Matrix.transformDirection() functions to apply the transform. Transforms can be combined by multiplying two or more transform matrices using the times function. |
Leap.Pointable |
The Pointable class reports the physical characteristics of a detected finger or tool. Both fingers and tools are classified as Pointable objects. Use the Pointable.tool property to determine whether a Pointable object represents a tool or finger. The Leap classifies a detected entity as a tool when it is thinner, straighter, and longer than a typical finger. Note that Pointable objects can be invalid, which means that they do not contain valid tracking data and do not correspond to a physical entity. Invalid Pointable objects can be the result of asking for a Pointable object using an ID from an earlier frame when no Pointable objects with that ID exist in the current frame. A Pointable object created from the Pointable constructor is also invalid. Test for validity with the Pointable.valid property. |
Leap.ScreenTapGesture |
The ScreenTapGesture class represents a tapping gesture by a finger or tool. A screen tap gesture is recognized when the tip of a finger pokes forward and then springs back to approximately the original postion, as if tapping a vertical screen. The tapping finger must pause briefly before beginning the tap. ScreenTap gestures are discrete. The ScreenTapGesture object representing a tap always has the state, STATE_STOP. Only one ScreenTapGesture object is created for each screen tap gesture recognized. |
Leap.SwipeGesture |
The SwipeGesture class represents a swiping motion of a finger or tool. Swipe gestures are continuous. |
Leap.Vector |
The Vector object represents a three-component mathematical vector or point such as a direction or position in three-dimensional space. The Leap software employs a right-handed Cartesian coordinate system. Values given are in units of real-world millimeters. The origin is centered at the center of the Leap device. The x- and z-axes lie in the horizontal plane, with the x-axis running parallel to the long edge of the device. The y-axis is vertical, with positive values increasing upwards (in contrast to the downward orientation of most computer graphics coordinate systems). The z-axis has positive values increasing away from the computer screen. |