Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Static Private Attributes | Friends | List of all members
Leap::Device Class Reference

#include <Leap.h>

Inheritance diagram for Leap::Device:
Inheritance graph
[legend]

Public Types

enum  Type { TYPE_PERIPHERAL = 1, TYPE_LAPTOP, TYPE_KEYBOARD }
 

Public Member Functions

def __eq__ (self, arg2)
 
def __init__ (self)
 
def __ne__ (self, arg2)
 
def __str__ (self)
 
LEAP_EXPORT float baseline () const
 
 Device (DeviceImplementation *)
 
LEAP_EXPORT Device ()
 
def distance_to_boundary (self, position)
 
LEAP_EXPORT float distanceToBoundary (const Vector &position) const
 
LEAP_EXPORT float horizontalViewAngle () const
 
LEAP_EXPORT bool isEmbedded () const
 
LEAP_EXPORT bool isFlipped () const
 
LEAP_EXPORT bool isStreaming () const
 
LEAP_EXPORT bool isValid () const
 
LEAP_EXPORT bool operator!= (const Device &) const
 
LEAP_EXPORT bool operator== (const Device &) const
 
LEAP_EXPORT Matrix orientation () const
 
LEAP_EXPORT Vector position () const
 
LEAP_EXPORT float range () const
 
std::string serialNumber () const
 
std::string toString () const
 
LEAP_EXPORT Type type () const
 
LEAP_EXPORT float verticalViewAngle () const
 
- Public Member Functions inherited from Leap::Interface
def __init__ (self, args, kwargs)
 

Static Public Member Functions

static LEAP_EXPORT const Deviceinvalid ()
 

Public Attributes

 this
 

Static Public Attributes

 baseline = _swig_property(LeapPython.Device_baseline_get)
 
 horizontal_view_angle = _swig_property(LeapPython.Device_horizontal_view_angle_get)
 
 is_embedded = _swig_property(LeapPython.Device_is_embedded_get)
 
 is_flipped = _swig_property(LeapPython.Device_is_flipped_get)
 
 is_streaming = _swig_property(LeapPython.Device_is_streaming_get)
 
 is_valid = _swig_property(LeapPython.Device_is_valid_get)
 
 orientation = _swig_property(LeapPython.Device_orientation_get)
 
 position = _swig_property(LeapPython.Device_position_get)
 
 range = _swig_property(LeapPython.Device_range_get)
 
 serial_number = _swig_property(LeapPython.Device_serial_number_get)
 
 type = _swig_property(LeapPython.Device_type_get)
 
 TYPE_KEYBOARD = LeapPython.Device_TYPE_KEYBOARD
 
 TYPE_LAPTOP = LeapPython.Device_TYPE_LAPTOP
 
 TYPE_PERIPHERAL = LeapPython.Device_TYPE_PERIPHERAL
 
 vertical_view_angle = _swig_property(LeapPython.Device_vertical_view_angle_get)
 

Private Member Functions

LEAP_EXPORT const char * serialNumberCString () const
 
LEAP_EXPORT const char * toCString () const
 

Static Private Attributes

 __getattr__ = lambdaself,name:_swig_getattr(self, Device, name)
 
 __repr__ = _swig_repr
 
 __setattr__ = lambdaself,name,value:_swig_setattr(self, Device, name, value)
 
 __swig_destroy__ = LeapPython.delete_Device
 
dictionary __swig_getmethods__ = {}
 
dictionary __swig_setmethods__ = {}
 

Friends

LEAP_EXPORT friend std::ostream & operator<< (std::ostream &, const Device &)
 

Additional Inherited Members

- Protected Member Functions inherited from Leap::Interface
template<typename T >
T * get () const
 
LEAP_EXPORT Interface (void *owner)
 
LEAP_EXPORT Interface (Implementation *reference, void *owner)
 
LEAP_EXPORT Interface (const Interface &rhs)
 
 Interface (class SharedObject *object)
 
LEAP_EXPORT Interfaceoperator= (const Interface &rhs)
 
virtual LEAP_EXPORT ~Interface ()
 
- Static Protected Member Functions inherited from Leap::Interface
static LEAP_EXPORT void deleteCString (const char *cstr)
 
- Protected Attributes inherited from Leap::Interface
class SharedObject * m_object
 

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. Test for validity with the Device::isValid() function.

Since
1.0

Definition at line 2651 of file Leap.h.

Member Enumeration Documentation

The available types of Leap Motion controllers.

Since
1.2
Enumerator
TYPE_PERIPHERAL 

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

Since
1.2
TYPE_LAPTOP 

A controller embedded in a keyboard.

Since
1.2
TYPE_KEYBOARD 

A controller embedded in a laptop computer.

Since
1.2

Definition at line 2658 of file Leap.h.

Constructor & Destructor Documentation

Leap::Device::Device ( DeviceImplementation *  )
LEAP_EXPORT Leap::Device::Device ( )

Constructs a Device object.

An uninitialized device is considered invalid. Get valid Device objects from a DeviceList object obtained using the Controller::devices() method.

Since
1.0
def Leap.Device.__init__ (   self)

Definition at line 1159 of file Leap.py.

Member Function Documentation

def Leap.Device.__eq__ (   self,
  arg2 
)

Definition at line 1169 of file Leap.py.

def Leap.Device.__ne__ (   self,
  arg2 
)

Definition at line 1172 of file Leap.py.

def Leap.Device.__str__ (   self)

Definition at line 1175 of file Leap.py.

LEAP_EXPORT float Leap::Device::baseline ( ) const

The distance between the center points of the stereo sensors.

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

Returns
The separation distance between the center of each sensor, in mm.
Since
2.2.5
def Leap.Device.distance_to_boundary (   self,
  position 
)

Definition at line 1166 of file Leap.py.

LEAP_EXPORT float Leap::Device::distanceToBoundary ( const Vector position) const

The distance to the nearest edge of the Leap Motion controller's view volume.

The view volume is an axis-aligned, inverted pyramid centered on the device origin and extending upward to the range limit. The walls of the pyramid are described by the horizontalViewAngle and verticalViewAngle and the roof by the range. This function estimates the distance between the specified input position and the nearest wall or roof of the view volume.

Parameters
positionThe point to use for the distance calculation.
Returns
The distance in millimeters from the input position to the nearest boundary.
Since
1.0
LEAP_EXPORT float Leap::Device::horizontalViewAngle ( ) const

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

Leap_horizontalViewAngle.png

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.

Returns
The horizontal angle of view in radians.
Since
1.0
static LEAP_EXPORT const Device& Leap::Device::invalid ( )
static

Returns an invalid Device object.

You can use the instance returned by this function in comparisons testing whether a given Device instance is valid or invalid. (You can also use the Device::isValid() function.)

Returns
The invalid Device instance.
Since
1.0
LEAP_EXPORT bool Leap::Device::isEmbedded ( ) const

Reports whether this device is embedded in another computer or computer peripheral.

Returns
True, if this device is embedded in a laptop, keyboard, or other computer component; false, if this device is a standalone controller.
Since
1.2
LEAP_EXPORT bool Leap::Device::isFlipped ( ) const

Deprecated. Always reports false.

Since
2.1
Deprecated:
2.1.1
LEAP_EXPORT bool Leap::Device::isStreaming ( ) const

Reports whether this device is streaming data to your application.

Currently only one controller can provide data at a time.

Since
1.2
LEAP_EXPORT bool Leap::Device::isValid ( ) const

Reports whether this is a valid Device object.

Returns
True, if this Device object contains valid data.
Since
1.0
LEAP_EXPORT bool Leap::Device::operator!= ( const Device ) const

Compare Device object inequality.

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
LEAP_EXPORT bool Leap::Device::operator== ( const Device ) const

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
LEAP_EXPORT Matrix Leap::Device::orientation ( ) const
LEAP_EXPORT Vector Leap::Device::position ( ) const
LEAP_EXPORT float Leap::Device::range ( ) const

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.

Returns
The recommended maximum range of the device in mm.
Since
1.0
std::string Leap::Device::serialNumber ( ) const
inline

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 2817 of file Leap.h.

LEAP_EXPORT const char* Leap::Device::serialNumberCString ( ) const
private
LEAP_EXPORT const char* Leap::Device::toCString ( ) const
private
std::string Leap::Device::toString ( ) const
inline

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

Returns
A description of the Device as a string.
Since
1.0

Definition at line 2917 of file Leap.h.

LEAP_EXPORT Type Leap::Device::type ( ) const

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.

Returns
The physical device type as a member of the DeviceType enumeration.
Since
1.2
LEAP_EXPORT float Leap::Device::verticalViewAngle ( ) const

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

Leap_verticalViewAngle.png

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.

Returns
The vertical angle of view in radians.
Since
1.0

Friends And Related Function Documentation

LEAP_EXPORT friend std::ostream& operator<< ( std::ostream &  ,
const Device  
)
friend

Writes a brief, human readable description of the Device object.

Since
1.0

Member Data Documentation

Leap.Device.__getattr__ = lambdaself,name:_swig_getattr(self, Device, name)
staticprivate

Definition at line 1153 of file Leap.py.

Leap.Device.__repr__ = _swig_repr
staticprivate

Definition at line 1154 of file Leap.py.

Leap.Device.__setattr__ = lambdaself,name,value:_swig_setattr(self, Device, name, value)
staticprivate

Definition at line 1149 of file Leap.py.

Leap.Device.__swig_destroy__ = LeapPython.delete_Device
staticprivate

Definition at line 1213 of file Leap.py.

dictionary Leap.Device.__swig_getmethods__ = {}
staticprivate

Definition at line 1150 of file Leap.py.

dictionary Leap.Device.__swig_setmethods__ = {}
staticprivate

Definition at line 1146 of file Leap.py.

Leap.Device.baseline = _swig_property(LeapPython.Device_baseline_get)
static

Definition at line 1188 of file Leap.py.

Leap.Device.horizontal_view_angle = _swig_property(LeapPython.Device_horizontal_view_angle_get)
static

Definition at line 1179 of file Leap.py.

Leap.Device.is_embedded = _swig_property(LeapPython.Device_is_embedded_get)
static

Definition at line 1194 of file Leap.py.

Leap.Device.is_flipped = _swig_property(LeapPython.Device_is_flipped_get)
static

Definition at line 1200 of file Leap.py.

Leap.Device.is_streaming = _swig_property(LeapPython.Device_is_streaming_get)
static

Definition at line 1197 of file Leap.py.

Leap.Device.is_valid = _swig_property(LeapPython.Device_is_valid_get)
static

Definition at line 1191 of file Leap.py.

Leap.Device.orientation = _swig_property(LeapPython.Device_orientation_get)
static

Definition at line 1212 of file Leap.py.

Leap.Device.position = _swig_property(LeapPython.Device_position_get)
static

Definition at line 1209 of file Leap.py.

Leap.Device.range = _swig_property(LeapPython.Device_range_get)
static

Definition at line 1185 of file Leap.py.

Leap.Device.serial_number = _swig_property(LeapPython.Device_serial_number_get)
static

Definition at line 1206 of file Leap.py.

Leap.Device.this

Definition at line 1164 of file Leap.py.

Leap.Device.type = _swig_property(LeapPython.Device_type_get)
static

Definition at line 1203 of file Leap.py.

Leap.Device.TYPE_KEYBOARD = LeapPython.Device_TYPE_KEYBOARD
static

Definition at line 1157 of file Leap.py.

Leap.Device.TYPE_LAPTOP = LeapPython.Device_TYPE_LAPTOP
static

Definition at line 1156 of file Leap.py.

Leap.Device.TYPE_PERIPHERAL = LeapPython.Device_TYPE_PERIPHERAL
static

Definition at line 1155 of file Leap.py.

Leap.Device.vertical_view_angle = _swig_property(LeapPython.Device_vertical_view_angle_get)
static

Definition at line 1182 of file Leap.py.


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


leap_motion
Author(s): Florian Lier , Mirza Shah , Isaac IY Saito
autogenerated on Tue Jun 2 2020 03:58:01