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

#include <Leap.h>

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

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 InteractionBoxinvalid ()
 

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 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 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.

Leap_InteractionBox.png

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.

Since
1.0

Definition at line 4469 of file Leap.h.

Constructor & Destructor Documentation

Leap::InteractionBox::InteractionBox ( InteractionBoxImplementation *  )
LEAP_EXPORT Leap::InteractionBox::InteractionBox ( )
def Leap.InteractionBox.__init__ (   self)

Definition at line 1878 of file Leap.py.

Member Function Documentation

def Leap.InteractionBox.__eq__ (   self,
  arg2 
)

Definition at line 1891 of file Leap.py.

def Leap.InteractionBox.__ne__ (   self,
  arg2 
)

Definition at line 1894 of file Leap.py.

def Leap.InteractionBox.__str__ (   self)

Definition at line 1897 of file Leap.py.

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.

Returns
The InteractionBox center in device coordinates.
Since
1.0
def Leap.InteractionBox.denormalize_point (   self,
  normalizedPosition 
)

Definition at line 1888 of file Leap.py.

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().

Parameters
normalizedPositionThe input position in InteractionBox coordinates.
Returns
The corresponding denormalized position in device coordinates.
Since
1.0
LEAP_EXPORT float Leap::InteractionBox::depth ( ) const

The depth of the InteractionBox in millimeters, measured along the z-axis.

Returns
The InteractionBox depth in millimeters.
Since
1.0
LEAP_EXPORT float Leap::InteractionBox::height ( ) const

The height of the InteractionBox in millimeters, measured along the y-axis.

Returns
The InteractionBox height in millimeters.
Since
1.0
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.)

Returns
The invalid InteractionBox instance.
Since
1.0
LEAP_EXPORT bool Leap::InteractionBox::isValid ( ) const

Reports whether this is a valid InteractionBox object.

Returns
True, if this InteractionBox object contains valid data.
Since
1.0
def Leap.InteractionBox.normalize_point (   self,
  position,
  clamp = True 
)

Definition at line 1885 of file Leap.py.

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.

Parameters
positionThe input position in device coordinates.
clampWhether or not to limit the output value to the range [0,1] when the input position is outside the InteractionBox. Defaults to true.
Returns
The normalized position.
Since
1.0
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.

Since
1.0
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.

Since
1.0
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.

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

Definition at line 4609 of file Leap.h.

LEAP_EXPORT float Leap::InteractionBox::width ( ) const

The width of the InteractionBox in millimeters, measured along the x-axis.

Returns
The InteractionBox width in millimeters.
Since
1.0

Friends And Related Function Documentation

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

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

Since
1.0

Member Data Documentation

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

Definition at line 1875 of file Leap.py.

Leap.InteractionBox.__repr__ = _swig_repr
staticprivate

Definition at line 1876 of file Leap.py.

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

Definition at line 1871 of file Leap.py.

Leap.InteractionBox.__swig_destroy__ = LeapPython.delete_InteractionBox
staticprivate

Definition at line 1914 of file Leap.py.

dictionary Leap.InteractionBox.__swig_getmethods__ = {}
staticprivate

Definition at line 1872 of file Leap.py.

dictionary Leap.InteractionBox.__swig_setmethods__ = {}
staticprivate

Definition at line 1868 of file Leap.py.

Leap.InteractionBox.center = _swig_property(LeapPython.InteractionBox_center_get)
static

Definition at line 1901 of file Leap.py.

Leap.InteractionBox.depth = _swig_property(LeapPython.InteractionBox_depth_get)
static

Definition at line 1910 of file Leap.py.

Leap.InteractionBox.height = _swig_property(LeapPython.InteractionBox_height_get)
static

Definition at line 1907 of file Leap.py.

Leap.InteractionBox.is_valid = _swig_property(LeapPython.InteractionBox_is_valid_get)
static

Definition at line 1913 of file Leap.py.

Leap.InteractionBox.this

Definition at line 1883 of file Leap.py.

Leap.InteractionBox.width = _swig_property(LeapPython.InteractionBox_width_get)
static

Definition at line 1904 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