Tanoda
Leap.Device Class Reference

The Device class represents a physically connected device. More...

Inheritance diagram for Leap.Device:

Public Types

enum  DeviceType {
  TYPE_INVALID = -1 , TYPE_PERIPHERAL = (int)eLeapDeviceType.eLeapDeviceType_Peripheral , TYPE_DRAGONFLY = (int)eLeapDeviceType.eLeapDeviceType_Dragonfly , TYPE_NIGHTCRAWLER = (int)eLeapDeviceType.eLeapDeviceType_Nightcrawler ,
  TYPE_RIGEL = (int)eLeapDeviceType.eLeapDevicePID_Rigel , TYPE_LAPTOP , TYPE_KEYBOARD
}
 The available types of Leap Motion controllers. More...
 

Public Member Functions

 Device ()
 Constructs a default Device object. More...
 
 Device (IntPtr deviceHandle, IntPtr internalHandle, float horizontalViewAngle, float verticalViewAngle, float range, float baseline, DeviceType type, uint status, string serialNumber)
 
void Update (float horizontalViewAngle, float verticalViewAngle, float range, float baseline, uint status, string serialNumber)
 For internal use only. More...
 
void Update (Device updatedDevice)
 For internal use only. More...
 
bool SetPaused (bool pause)
 
bool Equals (Device other)
 Compare Device object equality. More...
 
override string ToString ()
 A string containing a brief, human readable description of the Device object. More...
 

Protected Member Functions

uint GetDeviceStatus ()
 Returns the internal status field of the current device More...
 

Properties

IntPtr Handle [get]
 For internal use only. More...
 
float HorizontalViewAngle [get]
 The angle in radians of view along the x axis of this device. More...
 
float VerticalViewAngle [get]
 The angle in radians of view along the z axis of this device. More...
 
float Range [get]
 The maximum reliable tracking range from the center of this device. More...
 
float Baseline [get]
 The distance in mm between the center points of the stereo sensors. More...
 
bool IsStreaming [get, set]
 Reports whether this device is streaming data to your application. More...
 
DeviceType Type [get]
 The device type. More...
 
string SerialNumber [get]
 An alphanumeric serial number unique to each device. More...
 
bool IsSmudged [get, set]
 The software has detected a possible smudge on the translucent cover over the Leap Motion cameras. More...
 
bool IsLowResource [get, set]
 The software has entered low-resource mode More...
 
bool IsLightingBad [get, set]
 The software has detected excessive IR illumination, which may interfere with tracking. If robust mode is enabled, the system will enter robust mode when isLightingBad() is true. More...
 

Detailed Description

The Device class represents a physically connected device.

The Device class contains information related to a particular connected device such as device id, field of view relative to the device, and the position and orientation of the device in relative coordinates.

The position and orientation describe the alignment of the device relative to the user. The alignment relative to the user is only descriptive. Aligning devices to users provides consistency in the parameters that describe user interactions.

Note that Device objects can be invalid, which means that they do not contain valid device information and do not correspond to a physical device.

Since
1.0

Definition at line 28 of file Device.cs.

Member Enumeration Documentation

◆ DeviceType

The available types of Leap Motion controllers.

Enumerator
TYPE_INVALID 
TYPE_PERIPHERAL 

A standalone USB peripheral. The original Leap Motion controller device.

Since
1.2
TYPE_DRAGONFLY 

Internal research product codename "Dragonfly".

TYPE_NIGHTCRAWLER 

Internal research product codename "Nightcrawler".

TYPE_RIGEL 

Research product codename "Rigel".

TYPE_LAPTOP 
TYPE_KEYBOARD 

Definition at line 265 of file Device.cs.

Constructor & Destructor Documentation

◆ Device() [1/2]

Leap.Device.Device ( )

Constructs a default Device object.

Get valid Device objects from a DeviceList object obtained using the Controller.Devices() method.

Since
1.0

Definition at line 39 of file Device.cs.

◆ Device() [2/2]

Leap.Device.Device ( IntPtr  deviceHandle,
IntPtr  internalHandle,
float  horizontalViewAngle,
float  verticalViewAngle,
float  range,
float  baseline,
DeviceType  type,
uint  status,
string  serialNumber 
)

Definition at line 41 of file Device.cs.

Member Function Documentation

◆ Equals()

bool Leap.Device.Equals ( Device  other)

Compare Device object equality.

Two Device objects are equal if and only if both Device objects represent the exact same Device and both Devices are valid.

Since
1.0

Definition at line 134 of file Device.cs.

◆ GetDeviceStatus()

uint Leap.Device.GetDeviceStatus ( )
protected

Returns the internal status field of the current device

Definition at line 224 of file Device.cs.

◆ SetPaused()

bool Leap.Device.SetPaused ( bool  pause)

Definition at line 121 of file Device.cs.

◆ ToString()

override string Leap.Device.ToString ( )

A string containing a brief, human readable description of the Device object.

Since
1.0

Definition at line 142 of file Device.cs.

◆ Update() [1/2]

void Leap.Device.Update ( Device  updatedDevice)

For internal use only.

Definition at line 82 of file Device.cs.

◆ Update() [2/2]

void Leap.Device.Update ( float  horizontalViewAngle,
float  verticalViewAngle,
float  range,
float  baseline,
uint  status,
string  serialNumber 
)

For internal use only.

Definition at line 64 of file Device.cs.

Property Documentation

◆ Baseline

float Leap.Device.Baseline
get

The distance in mm between the center points of the stereo sensors.

The baseline value, together with the maximum resolution, influence the maximum range.

Since
2.2.5

Definition at line 188 of file Device.cs.

◆ Handle

IntPtr Leap.Device.Handle
get

For internal use only.

Definition at line 117 of file Device.cs.

◆ HorizontalViewAngle

float Leap.Device.HorizontalViewAngle
get

The angle in radians of view along the x axis of this device.

The Leap Motion controller scans a region in the shape of an inverted pyramid centered at the device's center and extending upwards. The horizontalViewAngle reports the view angle along the long dimension of the device.

Since
1.0

Definition at line 155 of file Device.cs.

◆ IsLightingBad

bool Leap.Device.IsLightingBad
getset

The software has detected excessive IR illumination, which may interfere with tracking. If robust mode is enabled, the system will enter robust mode when isLightingBad() is true.

Since
3.0

Definition at line 260 of file Device.cs.

◆ IsLowResource

bool Leap.Device.IsLowResource
getset

The software has entered low-resource mode

Since
3.0

Definition at line 252 of file Device.cs.

◆ IsSmudged

bool Leap.Device.IsSmudged
getset

The software has detected a possible smudge on the translucent cover over the Leap Motion cameras.

Since
3.0

Definition at line 246 of file Device.cs.

◆ IsStreaming

bool Leap.Device.IsStreaming
getset

Reports whether this device is streaming data to your application.

Currently only one controller can provide data at a time.

Since
1.2

Definition at line 196 of file Device.cs.

◆ Range

float Leap.Device.Range
get

The maximum reliable tracking range from the center of this device.

The range reports the maximum recommended distance from the device center for which tracking is expected to be reliable. This distance is not a hard limit. Tracking may be still be functional above this distance or begin to degrade slightly before this distance depending on calibration and extreme environmental conditions.

Since
1.0

Definition at line 178 of file Device.cs.

◆ SerialNumber

string Leap.Device.SerialNumber
get

An alphanumeric serial number unique to each device.

Consumer device serial numbers consist of 2 letters followed by 11 digits.

When using multiple devices, the serial number provides an unambiguous identifier for each device.

Since
2.2.2

Definition at line 219 of file Device.cs.

◆ Type

DeviceType Leap.Device.Type
get

The device type.

Use the device type value in the (rare) circumstances that you have an application feature which relies on a particular type of device. Current types of device include the original Leap Motion peripheral, keyboard-embedded controllers, and laptop-embedded controllers.

Since
1.2

Definition at line 208 of file Device.cs.

◆ VerticalViewAngle

float Leap.Device.VerticalViewAngle
get

The angle in radians of view along the z axis of this device.

The Leap Motion controller scans a region in the shape of an inverted pyramid centered at the device's center and extending upwards. The verticalViewAngle reports the view angle along the short dimension of the device.

Since
1.0

Definition at line 166 of file Device.cs.


The documentation for this class was generated from the following file: