#include <Leap.h>
Public Member Functions | |
def | __eq__ (self, arg2) |
def | __init__ (self) |
def | __ne__ (self, arg2) |
def | __str__ (self) |
LEAP_EXPORT Vector | center () const |
def | denormalize_point (self, normalizedPosition) |
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 (self, position, clamp=True) |
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 |
Public Member Functions inherited from Leap::Interface | |
def | __init__ (self, args, kwargs) |
Static Public Member Functions | |
static LEAP_EXPORT const InteractionBox & | invalid () |
Public Attributes | |
this | |
Static Public Attributes | |
center = _swig_property(LeapPython.InteractionBox_center_get) | |
depth = _swig_property(LeapPython.InteractionBox_depth_get) | |
height = _swig_property(LeapPython.InteractionBox_height_get) | |
is_valid = _swig_property(LeapPython.InteractionBox_is_valid_get) | |
width = _swig_property(LeapPython.InteractionBox_width_get) | |
Private Member Functions | |
LEAP_EXPORT const char * | toCString () const |
Static Private Attributes | |
__getattr__ = lambdaself,name:_swig_getattr(self, InteractionBox, name) | |
__repr__ = _swig_repr | |
__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 &) |
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 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 * | ) |
LEAP_EXPORT Leap::InteractionBox::InteractionBox | ( | ) |
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 |
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.
|
private |
|
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.
|
friend |
Writes a brief, human readable description of the InteractionBox object.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
static |
|
static |
|
static |
|
static |
|
static |