#include <Leap.h>
Public Member Functions | |
def | __eq__ |
def | __init__ |
def | __ne__ |
def | __str__ |
LEAP_EXPORT Vector | center () const |
def | denormalize_point |
LEAP_EXPORT Vector | denormalizePoint (const Vector &normalizedPosition) const |
LEAP_EXPORT float | depth () const |
LEAP_EXPORT float | height () const |
InteractionBox (InteractionBoxImplementation *) | |
LEAP_EXPORT | InteractionBox () |
LEAP_EXPORT bool | isValid () const |
def | normalize_point |
LEAP_EXPORT Vector | normalizePoint (const Vector &position, bool clamp=true) const |
LEAP_EXPORT bool | operator!= (const InteractionBox &) const |
LEAP_EXPORT bool | operator== (const InteractionBox &) const |
std::string | toString () const |
LEAP_EXPORT float | width () const |
Static Public Member Functions | |
static LEAP_EXPORT const InteractionBox & | invalid () |
Public Attributes | |
this | |
Static Public Attributes | |
tuple | center = _swig_property(LeapPython.InteractionBox_center_get) |
tuple | depth = _swig_property(LeapPython.InteractionBox_depth_get) |
tuple | height = _swig_property(LeapPython.InteractionBox_height_get) |
tuple | is_valid = _swig_property(LeapPython.InteractionBox_is_valid_get) |
tuple | width = _swig_property(LeapPython.InteractionBox_width_get) |
Private Member Functions | |
LEAP_EXPORT const char * | toCString () const |
Static Private Attributes | |
tuple | __getattr__ = lambdaself,name:_swig_getattr(self, InteractionBox, name) |
__repr__ = _swig_repr | |
tuple | __setattr__ = lambdaself,name,value:_swig_setattr(self, InteractionBox, name, value) |
__swig_destroy__ = LeapPython.delete_InteractionBox | |
dictionary | __swig_getmethods__ = {} |
dictionary | __swig_setmethods__ = {} |
Friends | |
LEAP_EXPORT friend std::ostream & | operator<< (std::ostream &, const InteractionBox &) |
The InteractionBox class represents a box-shaped region completely within the field of view of the Leap Motion controller.
The interaction box is an axis-aligned rectangular prism and provides normalized coordinates for hands, fingers, and tools within this box. The InteractionBox class can make it easier to map positions in the Leap Motion coordinate system to 2D or 3D coordinate systems used for application drawing.
The InteractionBox region is defined by a center and dimensions along the x, y, and z axes.
Get an InteractionBox object from a Frame object.
Leap::InteractionBox::InteractionBox | ( | InteractionBoxImplementation * | ) |
def Leap::InteractionBox::__init__ | ( | self | ) |
def Leap::InteractionBox::__eq__ | ( | self, | |
arg2 | |||
) |
def Leap::InteractionBox::__ne__ | ( | self, | |
arg2 | |||
) |
def Leap::InteractionBox::__str__ | ( | self | ) |
LEAP_EXPORT Vector Leap::InteractionBox::center | ( | ) | const |
The center of the InteractionBox in device coordinates (millimeters). This point is equidistant from all sides of the box.
def Leap::InteractionBox::denormalize_point | ( | self, | |
normalizedPosition | |||
) |
LEAP_EXPORT Vector Leap::InteractionBox::denormalizePoint | ( | const Vector & | normalizedPosition | ) | const |
Converts a position defined by normalized InteractionBox coordinates into device coordinates in millimeters.
This function performs the inverse of normalizePoint().
normalizedPosition | The input position in InteractionBox coordinates. |
LEAP_EXPORT float Leap::InteractionBox::depth | ( | ) | const |
The depth of the InteractionBox in millimeters, measured along the z-axis.
LEAP_EXPORT float Leap::InteractionBox::height | ( | ) | const |
The height of the InteractionBox in millimeters, measured along the y-axis.
static LEAP_EXPORT const InteractionBox& Leap::InteractionBox::invalid | ( | ) | [static] |
Returns an invalid InteractionBox object.
You can use the instance returned by this function in comparisons testing whether a given InteractionBox instance is valid or invalid. (You can also use the InteractionBox::isValid() function.)
LEAP_EXPORT bool Leap::InteractionBox::isValid | ( | ) | const |
Reports whether this is a valid InteractionBox object.
def Leap::InteractionBox::normalize_point | ( | self, | |
position, | |||
clamp = True |
|||
) |
LEAP_EXPORT Vector Leap::InteractionBox::normalizePoint | ( | const Vector & | position, |
bool | clamp = true |
||
) | const |
Normalizes the coordinates of a point using the interaction box.
Coordinates from the Leap Motion frame of reference (millimeters) are converted to a range of [0..1] such that the minimum value of the InteractionBox maps to 0 and the maximum value of the InteractionBox maps to 1.
position | The input position in device coordinates. |
clamp | Whether or not to limit the output value to the range [0,1] when the input position is outside the InteractionBox. Defaults to true. |
LEAP_EXPORT bool Leap::InteractionBox::operator!= | ( | const InteractionBox & | ) | const |
Compare InteractionBox object inequality.
Two InteractionBox objects are equal if and only if both InteractionBox objects represent the exact same InteractionBox and both InteractionBoxes are valid.
LEAP_EXPORT bool Leap::InteractionBox::operator== | ( | const InteractionBox & | ) | const |
Compare InteractionBox object equality.
Two InteractionBox objects are equal if and only if both InteractionBox objects represent the exact same InteractionBox and both InteractionBoxes are valid.
LEAP_EXPORT const char* Leap::InteractionBox::toCString | ( | ) | const [private] |
std::string Leap::InteractionBox::toString | ( | ) | const [inline] |
A string containing a brief, human readable description of the InteractionBox object.
LEAP_EXPORT float Leap::InteractionBox::width | ( | ) | const |
The width of the InteractionBox in millimeters, measured along the x-axis.
LEAP_EXPORT friend std::ostream& operator<< | ( | std::ostream & | , |
const InteractionBox & | |||
) | [friend] |
tuple Leap::InteractionBox::__getattr__ = lambdaself,name:_swig_getattr(self, InteractionBox, name) [static, private] |
Reimplemented from Leap::Interface.
Leap::InteractionBox::__repr__ = _swig_repr [static, private] |
tuple Leap::InteractionBox::__setattr__ = lambdaself,name,value:_swig_setattr(self, InteractionBox, name, value) [static, private] |
Reimplemented from Leap::Interface.
Leap::InteractionBox::__swig_destroy__ = LeapPython.delete_InteractionBox [static, private] |
dictionary Leap::InteractionBox::__swig_getmethods__ = {} [static, private] |
Reimplemented from Leap::Interface.
dictionary Leap::InteractionBox::__swig_setmethods__ = {} [static, private] |
Reimplemented from Leap::Interface.
tuple Leap::InteractionBox::center = _swig_property(LeapPython.InteractionBox_center_get) [static] |
tuple Leap::InteractionBox::depth = _swig_property(LeapPython.InteractionBox_depth_get) [static] |
tuple Leap::InteractionBox::height = _swig_property(LeapPython.InteractionBox_height_get) [static] |
tuple Leap::InteractionBox::is_valid = _swig_property(LeapPython.InteractionBox_is_valid_get) [static] |
tuple Leap::InteractionBox::width = _swig_property(LeapPython.InteractionBox_width_get) [static] |