Class Leap::Frame¶
- class Leap.Frame : public IEquatable<Frame>¶
The Frame class represents a set of hand and finger tracking data detected in a single frame.
The Leap Motion software detects hands, fingers and tools within the tracking area, reporting their positions, orientations, gestures, and motions in frames at the Leap Motion frame rate.
Access Frame objects through an instance of the Controller class.
- Since
1.0
Public Functions
- Frame (UInt32 DeviceID = 1)¶
Constructs a Frame object.
Frame instances created with this constructor are invalid. Get valid Frame objects by calling the Controller.Frame() function.
The only time you should use this constructor is before deserializing serialized frame data, or if you are going to be passing this Frame to a method that fills it with valid data.
- Since
1.0
- Hand Hand (int id)¶
The Hand object with the specified ID in this frame, or null if none exists.
Use the Frame.Hand() function to retrieve the Hand object from this frame using an ID value obtained from a previous frame. This function always returns a Hand object, but if no hand with the specified ID is present, an invalid Hand object is returned.
Note that ID values persist across frames, but only until tracking of a particular object is lost. If tracking of a hand is lost and subsequently regained, the new Hand object representing that physical hand may have a different ID than that representing the physical hand in an earlier frame.
- Since
1.0
- bool Equals (Frame other)¶
Compare Frame object equality.
Two Frame objects are equal if and only if both Frame objects represent the exact same frame of tracking data and both Frame objects are valid.
- Since
1.0
- override string ToString ()¶
A string containing a brief, human readable description of the Frame object.
- Since
1.0
- void ResizeHandList (int count)¶
Resizes the Hand list to have a specific size. If the size is decreased, the removed hands are placed into the hand pool. If the size is increased, the new spaces are filled with hands taken from the hand pool. If the pool is empty, new hands are constructed instead.
Public Members
- UInt32 DeviceID¶
The Device ID that this frame was seen from.
1-Indexed; Non-Deterministic order
Only valid when
supportsMultipleDevices
is true on the LeapProvider.- Since
4.1
- long Id¶
A unique ID for this Frame.
Consecutive frames processed by the Leap Motion software have consecutive increasing values. You can use the frame ID to avoid processing the same Frame object twice, as well as to make sure that your application processes every frame.
- Since
1.0
- long Timestamp¶
The frame capture time in microseconds elapsed since an arbitrary point in time in the past.
You can use Controller.Now() to calculate the age of the frame.
- Since
1.0
- float CurrentFramesPerSecond¶
The instantaneous framerate.
The rate at which the Leap Motion software is providing frames of data (in frames per second). The framerate can fluctuate depending on available computing resources, activity within the device field of view, software tracking settings, and other factors.
- Since
1.0