Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Static Private Attributes | Friends
Leap::InteractionBox Class Reference

#include <Leap.h>

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

List of all members.

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 &)

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 *  )

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.

Definition at line 1897 of file Leap.py.

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

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

Returns:
The InteractionBox depth in millimeters.
Since:
1.0

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

Returns:
The InteractionBox height in millimeters.
Since:
1.0

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

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.

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

tuple Leap::InteractionBox::__getattr__ = lambdaself,name:_swig_getattr(self, InteractionBox, name) [static, private]

Reimplemented from Leap::Interface.

Definition at line 1875 of file Leap.py.

Definition at line 1876 of file Leap.py.

tuple Leap::InteractionBox::__setattr__ = lambdaself,name,value:_swig_setattr(self, InteractionBox, name, value) [static, private]

Reimplemented from Leap::Interface.

Definition at line 1871 of file Leap.py.

Leap::InteractionBox::__swig_destroy__ = LeapPython.delete_InteractionBox [static, private]

Definition at line 1914 of file Leap.py.

dictionary Leap::InteractionBox::__swig_getmethods__ = {} [static, private]

Reimplemented from Leap::Interface.

Definition at line 1872 of file Leap.py.

dictionary Leap::InteractionBox::__swig_setmethods__ = {} [static, private]

Reimplemented from Leap::Interface.

Definition at line 1868 of file Leap.py.

tuple Leap::InteractionBox::center = _swig_property(LeapPython.InteractionBox_center_get) [static]

Definition at line 1901 of file Leap.py.

tuple Leap::InteractionBox::depth = _swig_property(LeapPython.InteractionBox_depth_get) [static]

Definition at line 1910 of file Leap.py.

tuple Leap::InteractionBox::height = _swig_property(LeapPython.InteractionBox_height_get) [static]

Definition at line 1907 of file Leap.py.

tuple Leap::InteractionBox::is_valid = _swig_property(LeapPython.InteractionBox_is_valid_get) [static]

Definition at line 1913 of file Leap.py.

Definition at line 1878 of file Leap.py.

tuple 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 Sat Jun 8 2019 18:47:25