![]() |
Leap Motion C API
3.1
The API to the LeapC library.
|
Structs passed to and received from LeapC functions. More...
Data Structures | |
| struct | LEAP_DEVICE_REF |
| A reference to a Leap device. More... | |
| struct | LEAP_CONNECTION_CONFIG |
| Specifies the configuration for a connection. More... | |
| struct | LEAP_CONNECTION_EVENT |
| Received from LeapPollConnection() when a connection to the Leap Motion service is established. More... | |
| struct | LEAP_CONNECTION_LOST_EVENT |
| Received from LeapPollConnection() when a connection to the Leap Motion service is lost. More... | |
| struct | LEAP_CONNECTION_INFO |
| Information about a connection. More... | |
| struct | LEAP_VARIANT |
| A variant data type used to get and set service configuration values. More... | |
| struct | LEAP_CONFIG_RESPONSE_EVENT |
| Contains the response to a configuration value request. More... | |
| struct | LEAP_CONFIG_CHANGE_EVENT |
| The result of a configuration change request. More... | |
| struct | LEAP_DEVICE_INFO |
| Properties of a Leap device. More... | |
| struct | LEAP_POLICY_EVENT |
| The response from a request to get or set a policy. More... | |
| struct | LEAP_DEVICE_EVENT |
| Device event information. More... | |
| struct | LEAP_DEVICE_FAILURE_EVENT |
| Device failure information. More... | |
| struct | LEAP_FRAME_HEADER |
| Identifying information for a frame of tracking data. More... | |
| struct | LEAP_IMAGE_PROPERTIES |
| Properties of a sensor image. More... | |
| struct | LEAP_DISTORTION_MATRIX |
| A matrix containing lens distortion correction coordinates. More... | |
| struct | LEAP_IMAGE_FRAME_REQUEST_TOKEN |
| Opaque struct that identifies an image request. More... | |
| struct | LEAP_IMAGE_COMPLETE_EVENT |
| The properties of a requested Image. More... | |
| struct | LEAP_IMAGE_FRAME_DESCRIPTION |
| Describes the image to request. More... | |
| struct | LEAP_IMAGE_FRAME_REQUEST_ERROR_EVENT |
| The error struct received from LeapPollConnection() when an image request goes wrong. More... | |
| struct | LEAP_VECTOR |
| A three element, floating-point vector. More... | |
| struct | LEAP_QUATERNION |
| A four element, floating point quaternion. More... | |
| struct | LEAP_BONE |
| Describes a bone's position and orientation. More... | |
| struct | LEAP_DIGIT |
| Describes the digit of a hand. More... | |
| struct | LEAP_PALM |
| Properties associated with the palm of the hand. More... | |
| struct | LEAP_HAND |
| Describes a tracked hand. More... | |
| struct | LEAP_TRACKING_EVENT |
| A snapshot, or frame of data, containing the tracking data for a single moment in time. More... | |
| struct | LEAP_LOG_EVENT |
| A system log message. More... | |
| struct | LEAP_DEVICE_STATUS_CHANGE_EVENT |
| A notification that a device's status has changed. More... | |
| struct | LEAP_CONNECTION_MESSAGE |
| Defines a basic message from the LeapC message queue. More... | |
| struct | LEAP_RECORDING_PARAMETERS |
| Read/Write mode for opening a LEAP_RECORDING. More... | |
| struct | LEAP_RECORDING_STATUS |
| Information about a current LEAP_RECORDING. More... | |
| struct | LEAP_CONNECTION |
| A handle to the Leap connection object. More... | |
| struct | LEAP_DEVICE |
| A handle to a Leap device object. More... | |
| struct | LEAP_CLOCK_REBASER |
| An opaque clock rebase state structure. More... | |
Typedefs | |
| typedef struct _LEAP_CALIBRATION * | LEAP_CALIBRATION |
| Represents a calibration object. More... | |
| typedef struct _LEAP_RECORDING * | LEAP_RECORDING |
| A Leap recording. More... | |
Structs passed to and received from LeapC functions.
| struct LEAP_DEVICE_REF |
A reference to a Leap device.
Get a LEAP_DEVICE_REF by calling LeapGetDeviceList(). Access a device by calling LeapOpenDevice() with this reference. LeapOpenDevice() provides a LEAP_DEVICE struct, which is a handle to an open device.
Data Fields | |
| void * | handle |
| An opaque handle. More... | |
| uint32_t | id |
| a generic identifier. More... | |
| void* LEAP_DEVICE_REF::handle |
An opaque handle.
| uint32_t LEAP_DEVICE_REF::id |
a generic identifier.
| struct LEAP_CONNECTION_CONFIG |
Specifies the configuration for a connection.
Currently, there are no externally useful configuration options.
Data Fields | |
| uint32_t | size |
| Set to the final size of the structure. More... | |
| uint32_t | flags |
| The connection configuration flags. More... | |
| const char * | server_namespace |
| For internal use. More... | |
| uint32_t LEAP_CONNECTION_CONFIG::flags |
The connection configuration flags.
(currently there are none.
| const char* LEAP_CONNECTION_CONFIG::server_namespace |
For internal use.
| uint32_t LEAP_CONNECTION_CONFIG::size |
Set to the final size of the structure.
| struct LEAP_CONNECTION_EVENT |
Received from LeapPollConnection() when a connection to the Leap Motion service is established.
Data Fields | |
| uint32_t | flags |
| A combination of eLeapServiceDisposition flags. More... | |
| uint32_t LEAP_CONNECTION_EVENT::flags |
A combination of eLeapServiceDisposition flags.
| struct LEAP_CONNECTION_LOST_EVENT |
Received from LeapPollConnection() when a connection to the Leap Motion service is lost.
If a LeapC function that performs a transaction with the Leap Motion service is called after the connection is lost, the next call to LeapPollConnection() will return this event. Otherwise, it can take up to 5 seconds of polling the connection to receive this event.
Data Fields | |
| uint32_t | flags |
| Reserved for future use. More... | |
| uint32_t LEAP_CONNECTION_LOST_EVENT::flags |
Reserved for future use.
| struct LEAP_CONNECTION_INFO |
Information about a connection.
Call LeapCreateConnection() to generate the handle for the connection; call LeapOpenConnection() to establish the connection; then call LeapGetConnectionInfo(), which creates this struct, to check the connection status.
Data Fields | |
| uint32_t | size |
| The size of this structure. More... | |
| eLeapConnectionStatus | status |
| The current status of this connection. More... | |
| uint32_t LEAP_CONNECTION_INFO::size |
The size of this structure.
| eLeapConnectionStatus LEAP_CONNECTION_INFO::status |
The current status of this connection.
| struct LEAP_VARIANT |
A variant data type used to get and set service configuration values.
Data Fields | |
| eLeapValueType | type |
| The active data type in this instance. More... | |
| bool | boolValue |
| A Boolean value. More... | |
| int32_t | iValue |
| An integer value. More... | |
| float | fValue |
| A floating point value. More... | |
| const char * | strValue |
| A pointer to a string buffer. More... | |
| bool LEAP_VARIANT::boolValue |
A Boolean value.
| float LEAP_VARIANT::fValue |
A floating point value.
| int32_t LEAP_VARIANT::iValue |
An integer value.
| const char* LEAP_VARIANT::strValue |
A pointer to a string buffer.
| eLeapValueType LEAP_VARIANT::type |
The active data type in this instance.
| struct LEAP_CONFIG_RESPONSE_EVENT |
Contains the response to a configuration value request.
Call LeapRequestConfigValue() to request a service config value. The value is fetched asynchronously since it requires a service transaction. LeapPollConnection() returns this event structure when the request has been processed. Use the requestID value to correlate the response to the originating request.
Data Fields | |
| uint32_t | requestID |
| An identifier for correlating the request and response. More... | |
| LEAP_VARIANT | value |
| The configuration value retrieved from the service. More... | |
| uint32_t LEAP_CONFIG_RESPONSE_EVENT::requestID |
An identifier for correlating the request and response.
| LEAP_VARIANT LEAP_CONFIG_RESPONSE_EVENT::value |
The configuration value retrieved from the service.
Do not free any memory pointed to by this member. The value held is only valid until the next call to LeapPollConnection().
| struct LEAP_CONFIG_CHANGE_EVENT |
The result of a configuration change request.
Contains a status of true for a successful change. Call LeapSaveConfigValue() to request a service config change. The change is performed asynchronously – and may fail. LeapPollConnection() returns this event structure when the request has been processed. Use the requestID value to correlate the response to the originating request.
Data Fields | |
| uint32_t | requestID |
| An identifier for correlating the request and response. More... | |
| bool | status |
| The result of the change operation: true on success; false on failure. More... | |
| uint32_t LEAP_CONFIG_CHANGE_EVENT::requestID |
An identifier for correlating the request and response.
| bool LEAP_CONFIG_CHANGE_EVENT::status |
The result of the change operation: true on success; false on failure.
| struct LEAP_DEVICE_INFO |
Properties of a Leap device.
Get a LEAP_DEVICE_INFO by calling LeapGetDeviceInfo() with the handle for device. The device must be open.
Data Fields | |
| uint32_t | size |
| Size of this structure. More... | |
| uint32_t | status |
| A combination of eLeapDeviceStatus flags. More... | |
| uint32_t | caps |
| A combination of eLeapDeviceCaps flags. More... | |
| eLeapDevicePID | pid |
| One of the eLeapDevicePID members. More... | |
| uint32_t | baseline |
| The device baseline, in micrometers. More... | |
| uint32_t | serial_length |
| The required length of the serial number char buffer. More... | |
| char * | serial |
| A pointer to the null-terminated device serial number string. More... | |
| float | h_fov |
| The horizontal field of view of this device in radians. More... | |
| float | v_fov |
| The vertical field of view of this device in radians. More... | |
| uint32_t | range |
| The maximum range for this device, in micrometers. More... | |
| uint32_t LEAP_DEVICE_INFO::baseline |
The device baseline, in micrometers.
The baseline is defined as the distance between the center axis of each lens in a stereo camera system. For other camera systems, this value is set to zero.
| uint32_t LEAP_DEVICE_INFO::caps |
A combination of eLeapDeviceCaps flags.
| float LEAP_DEVICE_INFO::h_fov |
The horizontal field of view of this device in radians.
| eLeapDevicePID LEAP_DEVICE_INFO::pid |
One of the eLeapDevicePID members.
| uint32_t LEAP_DEVICE_INFO::range |
The maximum range for this device, in micrometers.
| char* LEAP_DEVICE_INFO::serial |
A pointer to the null-terminated device serial number string.
| uint32_t LEAP_DEVICE_INFO::serial_length |
The required length of the serial number char buffer.
| uint32_t LEAP_DEVICE_INFO::size |
Size of this structure.
| uint32_t LEAP_DEVICE_INFO::status |
A combination of eLeapDeviceStatus flags.
| float LEAP_DEVICE_INFO::v_fov |
The vertical field of view of this device in radians.
| struct LEAP_POLICY_EVENT |
The response from a request to get or set a policy.
LeapPollConnection() creates this struct when the response becomes available.
Data Fields | |
| uint32_t | reserved |
| Reserved for future use. More... | |
| uint32_t | current_policy |
| A bitfield containing the policies effective at the time the policy event was processed. More... | |
| uint32_t LEAP_POLICY_EVENT::current_policy |
A bitfield containing the policies effective at the time the policy event was processed.
| uint32_t LEAP_POLICY_EVENT::reserved |
Reserved for future use.
| struct LEAP_DEVICE_EVENT |
Device event information.
LeapPollConnection() produces a message containing this event when a new device is detected. You can use the handle provided by the device filed to open a device so that you can access its properties.
Data Fields | |
| uint32_t | flags |
| Reserved for future use. More... | |
| LEAP_DEVICE_REF | device |
| The handle reference of to the newly attached device. More... | |
| uint32_t | status |
| The status of the connected device. More... | |
| LEAP_DEVICE_REF LEAP_DEVICE_EVENT::device |
The handle reference of to the newly attached device.
| uint32_t LEAP_DEVICE_EVENT::flags |
Reserved for future use.
| uint32_t LEAP_DEVICE_EVENT::status |
The status of the connected device.
A combination of flags from the eLeapDeviceStatus collection.
| struct LEAP_DEVICE_FAILURE_EVENT |
Device failure information.
LeapPollConnection() produces a message containing this event when a device fails. Only partial information may be available. If hDevice is non-null, then you can use it to identify the failed device with a known, open device.
Data Fields | |
| eLeapDeviceStatus | status |
| The status of this failure event. More... | |
| LEAP_DEVICE | hDevice |
| A handle to the device generating this failure event, if available, otherwise NULL. More... | |
| LEAP_DEVICE LEAP_DEVICE_FAILURE_EVENT::hDevice |
A handle to the device generating this failure event, if available, otherwise NULL.
You are not responsible for closing this handle.
| eLeapDeviceStatus LEAP_DEVICE_FAILURE_EVENT::status |
The status of this failure event.
| struct LEAP_FRAME_HEADER |
Identifying information for a frame of tracking data.
Data Fields | |
| void * | reserved |
| Reserved, set to zero. More... | |
| int64_t | frame_id |
| A unique identifier for this frame. More... | |
| int64_t | timestamp |
| The timestamp for this image, in microseconds, referenced against LeapGetNow(). More... | |
| int64_t LEAP_FRAME_HEADER::frame_id |
A unique identifier for this frame.
All frames carrying this frame ID are part of the same unit of processing. This counter is generally an increasing counter, but may reset to another value if the user stops and restarts streaming.
For interpolated frames, this value corresponds to the identifier of the frame upper bound.
| void* LEAP_FRAME_HEADER::reserved |
Reserved, set to zero.
| int64_t LEAP_FRAME_HEADER::timestamp |
The timestamp for this image, in microseconds, referenced against LeapGetNow().
| struct LEAP_IMAGE_PROPERTIES |
Properties of a sensor image.
Data Fields | |
| eLeapImageType | type |
| The type of this image. More... | |
| eLeapImageFormat | format |
| The format of this image. More... | |
| uint32_t | bpp |
| The number of bytes per image pixel. More... | |
| uint32_t | width |
| The number of horizontal pixels in the image. More... | |
| uint32_t | height |
| The number of rows of pixels in the image. More... | |
| float | x_scale |
| Reserved for future use. More... | |
| float | y_scale |
| Reserved for future use. More... | |
| float | x_offset |
| Reserved for future use. More... | |
| float | y_offset |
| Reserved for future use. More... | |
| uint32_t LEAP_IMAGE_PROPERTIES::bpp |
The number of bytes per image pixel.
| eLeapImageFormat LEAP_IMAGE_PROPERTIES::format |
The format of this image.
| uint32_t LEAP_IMAGE_PROPERTIES::height |
The number of rows of pixels in the image.
| eLeapImageType LEAP_IMAGE_PROPERTIES::type |
The type of this image.
| uint32_t LEAP_IMAGE_PROPERTIES::width |
The number of horizontal pixels in the image.
| float LEAP_IMAGE_PROPERTIES::x_offset |
Reserved for future use.
| float LEAP_IMAGE_PROPERTIES::x_scale |
Reserved for future use.
| float LEAP_IMAGE_PROPERTIES::y_offset |
Reserved for future use.
| float LEAP_IMAGE_PROPERTIES::y_scale |
Reserved for future use.
| struct LEAP_DISTORTION_MATRIX |
A matrix containing lens distortion correction coordinates.
Each point in the grid contains the coordinates of the pixel in the image buffer that contains the data for the pixel in the undistorted image corresponding to that point in the grid. Interpolate between points in the matrix to correct image pixels that don't fall directly underneath a point in the distortion grid.
Current devices use a 64x64 point distortion grid.
Data Fields | |
| struct { | |
| float x | |
| The x-pixel coordinate. More... | |
| float y | |
| The y-pixel coordinate. More... | |
| } | matrix [64][64] |
| A point in the distortion grid. More... | |
| struct { ... } LEAP_DISTORTION_MATRIX::matrix[ 64 ][ 64 ] |
A point in the distortion grid.
| float LEAP_DISTORTION_MATRIX::x |
The x-pixel coordinate.
| float LEAP_DISTORTION_MATRIX::y |
The y-pixel coordinate.
| struct LEAP_IMAGE_FRAME_REQUEST_TOKEN |
Opaque struct that identifies an image request.
You can correlate the call to LeapRequestImage() and the asynchronous LEAP_IMAGE_COMPLETE_EVENT or LEAP_IMAGE_FRAME_REQUEST_ERROR_EVENT messages produced by LeapPollConnection() by comparing the token provided by the original request with that provided by the event message.
You can also cancel a pending image request using the token.
Data Fields | |
| uint32_t | requestID |
| The ID of the request that was sent up to the service. More... | |
| uint32_t LEAP_IMAGE_FRAME_REQUEST_TOKEN::requestID |
The ID of the request that was sent up to the service.
This ID is not reused and should be treated as an opaque value.
| struct LEAP_IMAGE_COMPLETE_EVENT |
The properties of a requested Image.
LeapPollConnection() produces this message when a requested image is available. The struct contains image properties, the distortion grid, and a pointer to the buffer containing the image data – which is the same pointer that you passed to LeapC in the image request.
Data Fields | |
| LEAP_IMAGE_FRAME_REQUEST_TOKEN | token |
| A token which identifies the corresponding image request. More... | |
| LEAP_FRAME_HEADER | info |
| The information header identifying the images tracking frame. More... | |
| const LEAP_IMAGE_PROPERTIES * | properties |
| A pointer to the properties of the received image. More... | |
| uint64_t | matrix_version |
| A version number for the distortion matrix. More... | |
| LEAP_CALIBRATION | calib |
| For internal use only. More... | |
| LEAP_DISTORTION_MATRIX * | distortion_matrix [2] |
| Pointers to the left and right distortion matrix. More... | |
| void * | pfnData |
| The buffer you specified when calling LeapRequestImages(). More... | |
| uint64_t | data_written |
| The number of bytes written to the buffer pointed to by pfnData. More... | |
| LEAP_CALIBRATION LEAP_IMAGE_COMPLETE_EVENT::calib |
For internal use only.
| uint64_t LEAP_IMAGE_COMPLETE_EVENT::data_written |
The number of bytes written to the buffer pointed to by pfnData.
| LEAP_DISTORTION_MATRIX* LEAP_IMAGE_COMPLETE_EVENT::distortion_matrix[2] |
Pointers to the left and right distortion matrix.
| LEAP_FRAME_HEADER LEAP_IMAGE_COMPLETE_EVENT::info |
The information header identifying the images tracking frame.
| uint64_t LEAP_IMAGE_COMPLETE_EVENT::matrix_version |
A version number for the distortion matrix.
When the distortion matrix changes, this number is updated. This number is guaranteed not to repeat for the lifetime of the connection. This version number is also guaranteed to be distinct for each perspective of an image.
This value is guaranteed to be nonzero if it is valid.
The distortion matrix only changes when the streaming device changes or when the device orientation flips – inverting the image and the distortion grid. Since building a matrix to undistort an image can be a time-consuming task, you can optimize the process by only rebuilding this matrix (or whatever data type you use to correct image distortion) when the grid actually changes.
| void* LEAP_IMAGE_COMPLETE_EVENT::pfnData |
The buffer you specified when calling LeapRequestImages().
| const LEAP_IMAGE_PROPERTIES* LEAP_IMAGE_COMPLETE_EVENT::properties |
A pointer to the properties of the received image.
| LEAP_IMAGE_FRAME_REQUEST_TOKEN LEAP_IMAGE_COMPLETE_EVENT::token |
A token which identifies the corresponding image request.
| struct LEAP_IMAGE_FRAME_DESCRIPTION |
Describes the image to request.
Pass this struct to the LeapImageRequest() function.
Data Fields | |
| int64_t | frame_id |
| The ID of the frame corresponding to the desired image. More... | |
| eLeapImageType | type |
| The type of the desired image. More... | |
| uint64_t | buffer_len |
| Length of your image buffer. More... | |
| void * | pBuffer |
| An allocated buffer large enough to contain the requested image. More... | |
| uint64_t LEAP_IMAGE_FRAME_DESCRIPTION::buffer_len |
Length of your image buffer.
The buffer must be large enough to hold the request image.
| int64_t LEAP_IMAGE_FRAME_DESCRIPTION::frame_id |
The ID of the frame corresponding to the desired image.
| void* LEAP_IMAGE_FRAME_DESCRIPTION::pBuffer |
An allocated buffer large enough to contain the requested image.
The buffer must remain valid until the image request completes or fails.
| eLeapImageType LEAP_IMAGE_FRAME_DESCRIPTION::type |
The type of the desired image.
| struct LEAP_IMAGE_FRAME_REQUEST_ERROR_EVENT |
The error struct received from LeapPollConnection() when an image request goes wrong.
Data Fields | |
| LEAP_IMAGE_FRAME_REQUEST_TOKEN | token |
| A token which identifies the corresponding request. More... | |
| eLeapImageRequestError | error |
| The error code of the failure. More... | |
| uint64_t | required_buffer_len |
| If the error is eLeapImageRequestError_InsufficientBuffer, the minimum buffer size required for the requested image data. More... | |
| LEAP_IMAGE_FRAME_DESCRIPTION | description |
| A copy of the image frame description supplied in the request. More... | |
| LEAP_IMAGE_FRAME_DESCRIPTION LEAP_IMAGE_FRAME_REQUEST_ERROR_EVENT::description |
A copy of the image frame description supplied in the request.
| eLeapImageRequestError LEAP_IMAGE_FRAME_REQUEST_ERROR_EVENT::error |
The error code of the failure.
| uint64_t LEAP_IMAGE_FRAME_REQUEST_ERROR_EVENT::required_buffer_len |
If the error is eLeapImageRequestError_InsufficientBuffer, the minimum buffer size required for the requested image data.
| LEAP_IMAGE_FRAME_REQUEST_TOKEN LEAP_IMAGE_FRAME_REQUEST_ERROR_EVENT::token |
A token which identifies the corresponding request.
| struct LEAP_VECTOR |
A three element, floating-point vector.
Data Fields | |
| union { | |
| float v [3] | |
| The vector as an array. More... | |
| }; | |
| You can access the vector members as either an array or individual float values. More... | |
| float | x |
| The x spatial coordinate. More... | |
| float | y |
| The y spatial coordinate. More... | |
| float | z |
| The z spatial coordinate. More... | |
| union { ... } |
You can access the vector members as either an array or individual float values.
| float LEAP_VECTOR::v[3] |
The vector as an array.
| float LEAP_VECTOR::x |
The x spatial coordinate.
| float LEAP_VECTOR::y |
The y spatial coordinate.
| float LEAP_VECTOR::z |
The z spatial coordinate.
| struct LEAP_QUATERNION |
A four element, floating point quaternion.
| float LEAP_QUATERNION::v[4] |
The quaternion as an array.
| float LEAP_QUATERNION::w |
The scalar portion of the quaternion.
| float LEAP_QUATERNION::x |
The x coefficient of the vector portion of the quaternion.
| float LEAP_QUATERNION::y |
The y coefficient of the vector portion of the quaternion.
| float LEAP_QUATERNION::z |
The z coefficient of the vector portion of the quaternion.
| struct LEAP_BONE |
Data Fields | |
| LEAP_VECTOR | prev_joint |
| The base of the bone, closer to the heart. More... | |
| LEAP_VECTOR | next_joint |
| The end of the bone, further from the heart. More... | |
| float | width |
| The average width of the flesh around the bone in millimeters. More... | |
| LEAP_QUATERNION | rotation |
| Rotation in world space from the forward direction. More... | |
| LEAP_VECTOR LEAP_BONE::next_joint |
The end of the bone, further from the heart.
| LEAP_VECTOR LEAP_BONE::prev_joint |
The base of the bone, closer to the heart.
The bones origin.
| LEAP_QUATERNION LEAP_BONE::rotation |
Rotation in world space from the forward direction.
Convert the quaternion to a matrix to derive the basis vectors.
| float LEAP_BONE::width |
The average width of the flesh around the bone in millimeters.
| struct LEAP_DIGIT |
Data Fields | |
| int32_t | finger_id |
| The Leap identifier of this finger. More... | |
| LEAP_VECTOR | tip_velocity |
| The instantaneous speed at the finger tip in millimeters per second. More... | |
| LEAP_VECTOR | stabilized_tip_position |
| A time-filtered and stabilized position of the finger tip. More... | |
| uint32_t | is_extended |
| Reports whether the finger is more or less straight. More... | |
| LEAP_BONE | bones [4] |
| All the bones of a digit as an iterable collection. More... | |
| LEAP_BONE | metacarpal |
| The finger bone wholly inside the hand. More... | |
| LEAP_BONE | proximal |
| The phalange extending from the knuckle. More... | |
| LEAP_BONE | intermediate |
| The bone between the proximal phalange and the distal phalange. More... | |
| LEAP_BONE | distal |
| The distal phalange terminating at the finger tip. More... | |
| LEAP_BONE LEAP_DIGIT::bones[4] |
All the bones of a digit as an iterable collection.
| LEAP_BONE LEAP_DIGIT::distal |
The distal phalange terminating at the finger tip.
| int32_t LEAP_DIGIT::finger_id |
The Leap identifier of this finger.
| LEAP_BONE LEAP_DIGIT::intermediate |
The bone between the proximal phalange and the distal phalange.
| uint32_t LEAP_DIGIT::is_extended |
Reports whether the finger is more or less straight.
| LEAP_BONE LEAP_DIGIT::metacarpal |
The finger bone wholly inside the hand.
For thumbs, this bone is set to have zero length and width, an identity basis matrix, and its joint positions are equal. Note that this is anatomically incorrect; in anatomical terms, the intermediate phalange is absent in a real thumb, rather than the metacarpal bone. In the Leap Motion model, however, we use a "zero" metacarpal bone instead for ease of programming.
| LEAP_BONE LEAP_DIGIT::proximal |
The phalange extending from the knuckle.
| LEAP_VECTOR LEAP_DIGIT::stabilized_tip_position |
A time-filtered and stabilized position of the finger tip.
| LEAP_VECTOR LEAP_DIGIT::tip_velocity |
The instantaneous speed at the finger tip in millimeters per second.
| struct LEAP_PALM |
Properties associated with the palm of the hand.
The Palm is a member of the LEAP_HAND struct.
Data Fields | |
| LEAP_VECTOR | position |
| The center position of the palm in millimeters from the Leap Motion origin. More... | |
| LEAP_VECTOR | stabilized_position |
| The time-filtered and stabilized position of the palm. More... | |
| LEAP_VECTOR | velocity |
| The rate of change of the palm position in millimeters per second. More... | |
| LEAP_VECTOR | normal |
| The normal vector to the palm. More... | |
| float | width |
| The estimated width of the palm when the hand is in a flat position. More... | |
| LEAP_VECTOR | direction |
| The unit direction vector pointing from the palm position toward the fingers. More... | |
| LEAP_QUATERNION | orientation |
| The quaternion representing the palm's orientation corresponding to the basis {normal x direction, -normal, -direction}. More... | |
| LEAP_VECTOR LEAP_PALM::direction |
The unit direction vector pointing from the palm position toward the fingers.
| LEAP_VECTOR LEAP_PALM::normal |
The normal vector to the palm.
If your hand is flat, this vector will point downward, or "out" of the front surface of your palm.
| LEAP_QUATERNION LEAP_PALM::orientation |
The quaternion representing the palm's orientation corresponding to the basis {normal x direction, -normal, -direction}.
| LEAP_VECTOR LEAP_PALM::position |
The center position of the palm in millimeters from the Leap Motion origin.
| LEAP_VECTOR LEAP_PALM::stabilized_position |
The time-filtered and stabilized position of the palm.
Smoothing and stabilization is performed in order to make this value more suitable for interaction with 2D content. The stabilized position lags behind the palm position by a variable amount, depending primarily on the speed of movement.
| LEAP_VECTOR LEAP_PALM::velocity |
The rate of change of the palm position in millimeters per second.
| float LEAP_PALM::width |
The estimated width of the palm when the hand is in a flat position.
| struct LEAP_HAND |
Describes a tracked hand.
Data Fields | |
| uint32_t | id |
| A unique ID for a hand tracked across frames. More... | |
| uint32_t | flags |
| Reserved for future use. More... | |
| eLeapHandType | type |
| Identifies the chirality of this hand. More... | |
| float | confidence |
| How confident we are with a given hand pose. More... | |
| uint64_t | visible_time |
| The total amount of time this hand has been tracked, in microseconds. More... | |
| float | pinch_distance |
| The distance between index finger and thumb. More... | |
| float | grab_angle |
| The average angle of fingers to palm. More... | |
| float | pinch_strength |
| The normalized estimate of the pinch pose. More... | |
| float | grab_strength |
| The normalized estimate of the grab hand pose. More... | |
| LEAP_PALM | palm |
| Additional information associated with the palm. More... | |
| union { | |
| LEAP_DIGIT digits [5] | |
| The fingers of the hand as an array. More... | |
| }; | |
| The fingers of this hand. More... | |
| LEAP_BONE | arm |
| The arm to which this hand is attached. More... | |
| LEAP_DIGIT | thumb |
| The thumb. More... | |
| LEAP_DIGIT | index |
| The index finger. More... | |
| LEAP_DIGIT | middle |
| The middle finger. More... | |
| LEAP_DIGIT | ring |
| The ring finger. More... | |
| LEAP_DIGIT | pinky |
| The pinky finger. More... | |
| union { ... } |
The fingers of this hand.
| LEAP_BONE LEAP_HAND::arm |
| float LEAP_HAND::confidence |
How confident we are with a given hand pose.
Not currently used (always 1.0).
| LEAP_DIGIT LEAP_HAND::digits[5] |
The fingers of the hand as an array.
| uint32_t LEAP_HAND::flags |
Reserved for future use.
| float LEAP_HAND::grab_angle |
The average angle of fingers to palm.
| float LEAP_HAND::grab_strength |
The normalized estimate of the grab hand pose.
Zero is not grabbing; one is fully grabbing.
| uint32_t LEAP_HAND::id |
A unique ID for a hand tracked across frames.
If tracking of a physical hand is lost, a new ID is assigned when tracking is reacquired.
| LEAP_DIGIT LEAP_HAND::index |
The index finger.
| LEAP_DIGIT LEAP_HAND::middle |
The middle finger.
| LEAP_PALM LEAP_HAND::palm |
Additional information associated with the palm.
| float LEAP_HAND::pinch_distance |
The distance between index finger and thumb.
| float LEAP_HAND::pinch_strength |
The normalized estimate of the pinch pose.
Zero is not pinching; one is fully pinched.
| LEAP_DIGIT LEAP_HAND::pinky |
The pinky finger.
| LEAP_DIGIT LEAP_HAND::ring |
The ring finger.
| LEAP_DIGIT LEAP_HAND::thumb |
The thumb.
| eLeapHandType LEAP_HAND::type |
Identifies the chirality of this hand.
| uint64_t LEAP_HAND::visible_time |
The total amount of time this hand has been tracked, in microseconds.
| struct LEAP_TRACKING_EVENT |
A snapshot, or frame of data, containing the tracking data for a single moment in time.
The LEAP_FRAME struct is the container for all the tracking data.
Data Fields | |
| LEAP_FRAME_HEADER | info |
| A universal frame identification header. More... | |
| int64_t | tracking_frame_id |
| An identifier for this tracking frame. More... | |
| LEAP_VECTOR | interaction_box_size |
| The height, width, and depth of the interaction box. More... | |
| LEAP_VECTOR | interaction_box_center |
| Center point of the interaction box. More... | |
| LEAP_VECTOR | head_position |
| The position and orientation of the user's head. More... | |
| uint32_t | nHands |
| The number of hands tracked in this frame, i.e. More... | |
| LEAP_HAND * | pHands |
| A pointer to the array of hands tracked in this frame. More... | |
| float | framerate |
| Current tracking frame rate in hertz. More... | |
| float LEAP_TRACKING_EVENT::framerate |
Current tracking frame rate in hertz.
This frame rate is distinct from the image frame rate, which is the rate that images are being read from the device. Depending on host CPU limitations, the tracking frame rate may be substantially less than the device frame rate.
This number is generally equal to or less than the device frame rate, but there is one case where this number may be higher than the device frame rate: When the device rate drops. In this case, the device frame rate will fall sooner than the tracking frame rate.
This number is equal to zero if there are not enough frames to estimate frame rate.
This number cannot be negative.
| LEAP_VECTOR LEAP_TRACKING_EVENT::head_position |
The position and orientation of the user's head.
Positional tracking must be enabled.
| LEAP_FRAME_HEADER LEAP_TRACKING_EVENT::info |
A universal frame identification header.
| LEAP_VECTOR LEAP_TRACKING_EVENT::interaction_box_center |
Center point of the interaction box.
| LEAP_VECTOR LEAP_TRACKING_EVENT::interaction_box_size |
The height, width, and depth of the interaction box.
The interaction box is rectangular prism that is guaranteed to be completely inside the field-of-view and range of the device cameras. The box dimensions can change as the user's hands move closer or further from the device. (This can be disabled by setting the interaction_box_auto config setting to false.)
| uint32_t LEAP_TRACKING_EVENT::nHands |
The number of hands tracked in this frame, i.e.
the number of elements in the pHands array.
| LEAP_HAND* LEAP_TRACKING_EVENT::pHands |
A pointer to the array of hands tracked in this frame.
| int64_t LEAP_TRACKING_EVENT::tracking_frame_id |
An identifier for this tracking frame.
This identifier is meant to be monotonically increasing, but values may be skipped if the client application does not poll for messages fast enough. This number also generally increases at the same rate as info.frame_id, but if the server cannot process every image received from the device cameras, the info.frame_id identifier may increase faster.
| struct LEAP_LOG_EVENT |
A system log message.
Data Fields | |
| eLeapLogSeverity | Severity |
| The type of message. More... | |
| int64_t | Timestamp |
| The timestamp of the message in microseconds. More... | |
| const char * | Message |
| A pointer to a null-terminated string containing the current log message. More... | |
| const char* LEAP_LOG_EVENT::Message |
A pointer to a null-terminated string containing the current log message.
| eLeapLogSeverity LEAP_LOG_EVENT::Severity |
The type of message.
| int64_t LEAP_LOG_EVENT::Timestamp |
The timestamp of the message in microseconds.
Compare with the current values of LeapGetNow() and the system clock to calculate the absolute time of the message.
| struct LEAP_DEVICE_STATUS_CHANGE_EVENT |
A notification that a device's status has changed.
One of these messages is received by the client as soon as the service is connected, or when a new device is attached.
Data Fields | |
| LEAP_DEVICE_REF | device |
| A reference to the device whose status has changed. | |
| uint32_t | last_status |
| The last known status of the device. More... | |
| uint32_t | status |
| The current status of the device. More... | |
| uint32_t LEAP_DEVICE_STATUS_CHANGE_EVENT::last_status |
The last known status of the device.
This is a combination of eLeapDeviceStatus flags.
| uint32_t LEAP_DEVICE_STATUS_CHANGE_EVENT::status |
The current status of the device.
This is a combination of eLeapDeviceStatus flags.
| struct LEAP_CONNECTION_MESSAGE |
Defines a basic message from the LeapC message queue.
Set by calling LeapPollConnection().
| union { ... } |
A pointer to the event data for the current type of message.
| const LEAP_CONFIG_CHANGE_EVENT* LEAP_CONNECTION_MESSAGE::config_change_event |
A set config value message.
| const LEAP_CONFIG_RESPONSE_EVENT* LEAP_CONNECTION_MESSAGE::config_response_event |
A get config value message.
| const LEAP_CONNECTION_EVENT* LEAP_CONNECTION_MESSAGE::connection_event |
A connection message.
| const LEAP_CONNECTION_LOST_EVENT* LEAP_CONNECTION_MESSAGE::connection_lost_event |
A connection lost.
| const LEAP_DEVICE_EVENT* LEAP_CONNECTION_MESSAGE::device_event |
A device detected message.
| const LEAP_DEVICE_FAILURE_EVENT* LEAP_CONNECTION_MESSAGE::device_failure_event |
A device failure message.
| const LEAP_DEVICE_STATUS_CHANGE_EVENT* LEAP_CONNECTION_MESSAGE::device_status_change_event |
A device's status has changed.
| const LEAP_IMAGE_COMPLETE_EVENT* LEAP_CONNECTION_MESSAGE::image_complete_event |
An image request complete message.
| const LEAP_IMAGE_FRAME_REQUEST_ERROR_EVENT* LEAP_CONNECTION_MESSAGE::image_request_error_event |
An image request error message.
| const LEAP_LOG_EVENT* LEAP_CONNECTION_MESSAGE::log_event |
A log message.
| const void* LEAP_CONNECTION_MESSAGE::pointer |
An untyped pointer.
| const LEAP_POLICY_EVENT* LEAP_CONNECTION_MESSAGE::policy_event |
A policy message.
| uint32_t LEAP_CONNECTION_MESSAGE::size |
The size of this message struct.
| const LEAP_TRACKING_EVENT* LEAP_CONNECTION_MESSAGE::tracking_event |
A tracking message.
| eLeapEventType LEAP_CONNECTION_MESSAGE::type |
The message type.
| struct LEAP_RECORDING_PARAMETERS |
Read/Write mode for opening a LEAP_RECORDING.
since 3.2.0
Data Fields | |
| uint32_t | mode |
| A combination of eLeapRecordingFlags indicating the desired operations. More... | |
| uint32_t LEAP_RECORDING_PARAMETERS::mode |
A combination of eLeapRecordingFlags indicating the desired operations.
| struct LEAP_RECORDING_STATUS |
Information about a current LEAP_RECORDING.
Filled in by a call to LeapRecordingGetStatus().
Data Fields | |
| uint32_t | mode |
| Some combination of eLeapRecordingFlags indicating the status of the recording. More... | |
| uint32_t LEAP_RECORDING_STATUS::mode |
Some combination of eLeapRecordingFlags indicating the status of the recording.
| struct LEAP_CONNECTION |
A handle to the Leap connection object.
Use this handle to specify the connection for an operation.
| struct LEAP_DEVICE |
A handle to a Leap device object.
Use this handle to specify the device for an operation.
| struct LEAP_CLOCK_REBASER |
An opaque clock rebase state structure.
| typedef struct _LEAP_CALIBRATION* LEAP_CALIBRATION |
Represents a calibration object.
Not currently of any particular use.
| typedef struct _LEAP_RECORDING* LEAP_RECORDING |
A Leap recording.