Driver for Ultraleap's V2 API for the Leap Motion Controller.  
More...
#include "ulv2_interface.h"
#include "util/u_device.h"
#include "util/u_var.h"
#include "util/u_debug.h"
#include "math/m_space.h"
#include "math/m_api.h"
#include "util/u_time.h"
#include "os/os_time.h"
#include "os/os_threading.h"
#include "Leap.h"
 | 
| 
#define  | ULV2_TRACE(ulv2d, ...)   U_LOG_XDEV_IFL_T(&ulv2d->base, ulv2d->log_level, __VA_ARGS__) | 
|   | 
| 
#define  | ULV2_DEBUG(ulv2d, ...)   U_LOG_XDEV_IFL_D(&ulv2d->base, ulv2d->log_level, __VA_ARGS__) | 
|   | 
| 
#define  | ULV2_INFO(ulv2d, ...)   U_LOG_XDEV_IFL_I(&ulv2d->base, ulv2d->log_level, __VA_ARGS__) | 
|   | 
| 
#define  | ULV2_WARN(ulv2d, ...)   U_LOG_XDEV_IFL_W(&ulv2d->base, ulv2d->log_level, __VA_ARGS__) | 
|   | 
| 
#define  | ULV2_ERROR(ulv2d, ...)   U_LOG_XDEV_IFL_E(&ulv2d->base, ulv2d->log_level, __VA_ARGS__) | 
|   | 
| #define  | printf_pose(pose) | 
|   | 
| 
#define  | xrtj(y)   &joint_set->values.hand_joint_set_default[XRT_HAND_JOINT_##y] | 
|   | 
| 
#define  | fb(y)   finger.bone(y) | 
|   | 
| 
#define  | prevJ(y)   finger.bone(y).prevJoint() | 
|   | 
| 
#define  | nextJ(y)   finger.bone(y).nextJoint() | 
|   | 
| 
#define  | lm   Leap::Bone::TYPE_METACARPAL | 
|   | 
| 
#define  | lp   Leap::Bone::TYPE_PROXIMAL | 
|   | 
| 
#define  | li   Leap::Bone::TYPE_INTERMEDIATE | 
|   | 
| 
#define  | ld   Leap::Bone::TYPE_DISTAL | 
|   | 
 | 
| enum   | leap_thread_status { THREAD_NOT_STARTED
, THREAD_OK
, THREAD_ERRORED_OUT
 } | 
|   | 
 | 
| 
struct ulv2_device *  | ulv2_device (struct xrt_device *xdev) | 
|   | 
| 
static void  | ulv2_process_joint (Leap::Vector jointpos, Leap::Matrix jointbasis, float width, int side, struct xrt_hand_joint_value *joint) | 
|   | 
| 
void  | ulv2_process_hand (Leap::Hand hand, xrt_hand_joint_set *joint_set, int hi) | 
|   | 
| void *  | leap_input_loop (void *ptr_to_xdev) | 
|   | 
| 
static void  | ulv2_device_get_hand_tracking (struct xrt_device *xdev, enum xrt_input_name name, uint64_t at_timestamp_ns, struct xrt_hand_joint_set *out_value, uint64_t *out_timestamp_ns) | 
|   | 
| 
static void  | ulv2_device_destroy (struct xrt_device *xdev) | 
|   | 
| xrt_result_t  | ulv2_create_device (struct xrt_device **out_xdev) | 
|   | Probing function for Leap Motion Controller.  More...
  | 
|   | 
◆ printf_pose
      
        
          | #define printf_pose | 
          ( | 
            | 
          pose | ) | 
           | 
        
      
 
Value:        printf("%f %f %f  %f %f %f %f\n", pose.position.x, pose.position.y, pose.position.z, pose.orientation.x,       \
               pose.orientation.y, pose.orientation.z, pose.orientation.w);
 
 
 
◆ leap_input_loop()
      
        
          | void * leap_input_loop  | 
          ( | 
          void *  | 
          ptr_to_xdev | ) | 
           | 
        
      
 
- Todo:
 - (Moshi Turner) Could be using LeapController.now() to try to emulate our own pose prediction, but I ain't got time for that 
 
 
 
◆ valid_flags
Initial value:
    XRT_SPACE_RELATION_ORIENTATION_VALID_BIT | XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT |
    XRT_SPACE_RELATION_POSITION_VALID_BIT | XRT_SPACE_RELATION_POSITION_TRACKED_BIT)
xrt_space_relation_flags
Flags of which components of a xrt_space_relation is valid.
Definition: xrt_defines.h:627