#include <Leap.h>
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 Device & | invalid () |
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 Interface & | operator= (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 |
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 * | ) |
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.
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.
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 |
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.
|
inline |
|
private |
|
private |
|
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.
|
friend |
Writes a brief, human readable description of the Device object.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |