Class LeapInternal::Connection

class LeapInternal.Connection

Public Functions

LEAP_VERSION GetCurrentServiceVersion ()

Returns the version of the currently installed Tracking Service. Might return 0.0.0 if no device is connected or it cannot get the current version.

Return

the current tracking service version

bool IsPolicySet (Controller.PolicyFlag policy, Device device = null)

Gets the active setting for a specific policy.

Keep in mind that setting a policy flag is asynchronous, so changes are not effective immediately after calling setPolicyFlag(). In addition, a policy request can be declined by the user. You should always set the policy flags required by your application at startup and check that the policy change request was successful after an appropriate interval.

If the controller object is not connected to the Leap Motion software, then the default state for the selected policy is returned.

Since

2.1.6

void SubscribeToDeviceEvents (Device device)

Subscribes to the events coming from an individual device

If this is not called, only the primary device will be subscribed. Will automatically unsubscribe the primary device if this is called on a secondary device, but not a primary one.

Since

4.1

void UnsubscribeFromDeviceEvents (Device device)

Unsubscribes from the events coming from an individual device

This can be called safely, even if the device has not been subscribed.

Since

4.1

UnityEngine.Vector3 PixelToRectilinear (Image.CameraType camera, UnityEngine.Vector3 pixel)

Converts from image-space pixel coordinates to camera-space rectilinear coordinates

UnityEngine.Vector3 PixelToRectilinearEx (IntPtr deviceHandle, Image.CameraType camera, UnityEngine.Vector3 pixel)

Converts from image-space pixel coordinates to camera-space rectilinear coordinates

Also allows specifying a specific device handle and calibration type.

UnityEngine.Vector3 RectilinearToPixel (Image.CameraType camera, UnityEngine.Vector3 ray)

Converts from camera-space rectilinear coordinates to image-space pixel coordinates

UnityEngine.Vector3 RectilinearToPixelEx (IntPtr deviceHandle, Image.CameraType camera, UnityEngine.Vector3 ray)

Converts from camera-space rectilinear coordinates to image-space pixel coordinates

Also allows specifying a specific device handle and calibration type.

Matrix4x4 LeapExtrinsicCameraMatrix (Image.CameraType camera, Device device)

Request the Extrinsic Camera Matrix

void RequestHandTrackingHintsOnDevice (IntPtr hDevice, string[] hints)

Send a specific set of hints to hDevice, if this does not include previously set ones, they will be cleared.

Param hDevice

The Device pointer for the trcking device to set the hints for

Param hints

The array of hints

Properties

bool IsServiceConnected { get; set; }

Reports whether your application has a connection to the Leap Motion daemon/service. Can be true even if the Leap Motion hardware is not available.

Since

1.2

DeviceList Devices { get; set; }

The list of currently attached and recognized Leap Motion controller devices.

The Device objects in the list describe information such as the range and tracking volume.

Currently, the Leap Motion Controller only allows a single active device at a time, however there may be multiple devices physically attached and listed here. Any active device(s) are guaranteed to be listed first, however order is not determined beyond that.

Since

1.0

Public Static Functions

static bool IsConnectionAvailable (string serverNamespace = “Leap Service”)

Temporarily makes a connection to determine if a Service is available. Returns the result and closes the temporary connection upon completion.

struct Key