#include <Leap.h>
Public Types | |
enum | Type { TYPE_PERIPHERAL = 1, TYPE_LAPTOP, TYPE_KEYBOARD } |
Public Member Functions | |
def | __eq__ |
def | __init__ |
def | __ne__ |
def | __str__ |
LEAP_EXPORT float | baseline () const |
Device (DeviceImplementation *) | |
LEAP_EXPORT | Device () |
def | distance_to_boundary |
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 |
Static Public Member Functions | |
static LEAP_EXPORT const Device & | invalid () |
Public Attributes | |
this | |
Static Public Attributes | |
tuple | baseline = _swig_property(LeapPython.Device_baseline_get) |
tuple | horizontal_view_angle = _swig_property(LeapPython.Device_horizontal_view_angle_get) |
tuple | is_embedded = _swig_property(LeapPython.Device_is_embedded_get) |
tuple | is_flipped = _swig_property(LeapPython.Device_is_flipped_get) |
tuple | is_streaming = _swig_property(LeapPython.Device_is_streaming_get) |
tuple | is_valid = _swig_property(LeapPython.Device_is_valid_get) |
tuple | orientation = _swig_property(LeapPython.Device_orientation_get) |
tuple | position = _swig_property(LeapPython.Device_position_get) |
tuple | range = _swig_property(LeapPython.Device_range_get) |
tuple | serial_number = _swig_property(LeapPython.Device_serial_number_get) |
tuple | 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 | |
tuple | 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 | |
tuple | __getattr__ = lambdaself,name:_swig_getattr(self, Device, name) |
__repr__ = _swig_repr | |
tuple | __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 &) |
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.
enum Leap::Device::Type |
Leap::Device::Device | ( | DeviceImplementation * | ) |
Constructs a Device object.
An uninitialized device is considered invalid. Get valid Device objects from a DeviceList object obtained using the Controller::devices() method.
def Leap::Device::__init__ | ( | self | ) |
def Leap::Device::__eq__ | ( | self, | |
arg2 | |||
) |
def Leap::Device::__ne__ | ( | self, | |
arg2 | |||
) |
def Leap::Device::__str__ | ( | self | ) |
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.
def Leap::Device::distance_to_boundary | ( | self, | |
position | |||
) |
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.
position | The point to use for the distance calculation. |
LEAP_EXPORT float Leap::Device::horizontalViewAngle | ( | ) | const |
The angle 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.
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.)
LEAP_EXPORT bool Leap::Device::isEmbedded | ( | ) | const |
Reports whether this device is embedded in another computer or computer peripheral.
LEAP_EXPORT bool Leap::Device::isFlipped | ( | ) | const |
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.
LEAP_EXPORT bool Leap::Device::isValid | ( | ) | const |
LEAP_EXPORT bool Leap::Device::operator!= | ( | const Device & | ) | const |
LEAP_EXPORT bool Leap::Device::operator== | ( | const Device & | ) | const |
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.
std::string Leap::Device::serialNumber | ( | ) | const [inline] |
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] |
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.
LEAP_EXPORT float Leap::Device::verticalViewAngle | ( | ) | const |
The angle 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.
LEAP_EXPORT friend std::ostream& operator<< | ( | std::ostream & | , |
const Device & | |||
) | [friend] |
tuple Leap::Device::__getattr__ = lambdaself,name:_swig_getattr(self, Device, name) [static, private] |
Reimplemented from Leap::Interface.
Leap::Device::__repr__ = _swig_repr [static, private] |
tuple Leap::Device::__setattr__ = lambdaself,name,value:_swig_setattr(self, Device, name, value) [static, private] |
Reimplemented from Leap::Interface.
Leap::Device::__swig_destroy__ = LeapPython.delete_Device [static, private] |
dictionary Leap::Device::__swig_getmethods__ = {} [static, private] |
Reimplemented from Leap::Interface.
dictionary Leap::Device::__swig_setmethods__ = {} [static, private] |
Reimplemented from Leap::Interface.
tuple Leap::Device::baseline = _swig_property(LeapPython.Device_baseline_get) [static] |
tuple Leap::Device::horizontal_view_angle = _swig_property(LeapPython.Device_horizontal_view_angle_get) [static] |
tuple Leap::Device::is_embedded = _swig_property(LeapPython.Device_is_embedded_get) [static] |
tuple Leap::Device::is_flipped = _swig_property(LeapPython.Device_is_flipped_get) [static] |
tuple Leap::Device::is_streaming = _swig_property(LeapPython.Device_is_streaming_get) [static] |
tuple Leap::Device::is_valid = _swig_property(LeapPython.Device_is_valid_get) [static] |
tuple Leap::Device::orientation = _swig_property(LeapPython.Device_orientation_get) [static] |
tuple Leap::Device::position = _swig_property(LeapPython.Device_position_get) [static] |
tuple Leap::Device::range = _swig_property(LeapPython.Device_range_get) [static] |
tuple Leap::Device::serial_number = _swig_property(LeapPython.Device_serial_number_get) [static] |
tuple Leap::Device::type = _swig_property(LeapPython.Device_type_get) [static] |
Leap::Device::TYPE_KEYBOARD = LeapPython.Device_TYPE_KEYBOARD [static] |
Leap::Device::TYPE_LAPTOP = LeapPython.Device_TYPE_LAPTOP [static] |
Leap::Device::TYPE_PERIPHERAL = LeapPython.Device_TYPE_PERIPHERAL [static] |
tuple Leap::Device::vertical_view_angle = _swig_property(LeapPython.Device_vertical_view_angle_get) [static] |