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

#include <Leap.h>

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

Public Member Functions

def __init__ (self, args)
 
def __str__ (self)
 
 Tool (ToolImplementation *)
 
LEAP_EXPORT Tool ()
 
LEAP_EXPORT Tool (const Pointable &)
 
std::string toString () const
 
- Public Member Functions inherited from Leap::Pointable
def __eq__ (self, arg2)
 
def __init__ (self)
 
def __ne__ (self, arg2)
 
def __str__ (self)
 
LEAP_EXPORT Vector direction () const
 
LEAP_EXPORT Frame frame () const
 
LEAP_EXPORT Hand hand () const
 
LEAP_EXPORT int32_t id () const
 
LEAP_EXPORT bool isExtended () const
 
LEAP_EXPORT bool isFinger () const
 
LEAP_EXPORT bool isTool () const
 
LEAP_EXPORT bool isValid () const
 
LEAP_EXPORT float length () const
 
LEAP_EXPORT bool operator!= (const Pointable &) const
 
LEAP_EXPORT bool operator== (const Pointable &) const
 
 Pointable (PointableImplementation *)
 
 Pointable (FingerImplementation *)
 
 Pointable (ToolImplementation *)
 
LEAP_EXPORT Pointable ()
 
LEAP_EXPORT Vector stabilizedTipPosition () const
 
LEAP_EXPORT float timeVisible () const
 
LEAP_EXPORT Vector tipPosition () const
 
LEAP_EXPORT Vector tipVelocity () const
 
std::string toString () const
 
LEAP_EXPORT float touchDistance () const
 
LEAP_EXPORT Zone touchZone () 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 Toolinvalid ()
 
- Static Public Member Functions inherited from Leap::Pointable
static LEAP_EXPORT const Pointableinvalid ()
 

Public Attributes

 this
 
- Public Attributes inherited from Leap::Pointable
 this
 

Private Member Functions

LEAP_EXPORT const char * toCString () const
 

Static Private Attributes

 __getattr__ = lambdaself,name:_swig_getattr(self, Tool, name)
 
 __repr__ = _swig_repr
 
 __setattr__ = lambdaself,name,value:_swig_setattr(self, Tool, name, value)
 
 __swig_destroy__ = LeapPython.delete_Tool
 
dictionary __swig_getmethods__ = {}
 
dictionary __swig_setmethods__ = {}
 

Additional Inherited Members

- Public Types inherited from Leap::Pointable
enum  Zone { ZONE_NONE = 0, ZONE_HOVERING = 1, ZONE_TOUCHING = 2 }
 
- Static Public Attributes inherited from Leap::Pointable
 direction = _swig_property(LeapPython.Pointable_direction_get)
 
 frame = _swig_property(LeapPython.Pointable_frame_get)
 
 hand = _swig_property(LeapPython.Pointable_hand_get)
 
 id = _swig_property(LeapPython.Pointable_id_get)
 
 is_extended = _swig_property(LeapPython.Pointable_is_extended_get)
 
 is_finger = _swig_property(LeapPython.Pointable_is_finger_get)
 
 is_tool = _swig_property(LeapPython.Pointable_is_tool_get)
 
 is_valid = _swig_property(LeapPython.Pointable_is_valid_get)
 
 length = _swig_property(LeapPython.Pointable_length_get)
 
 stabilized_tip_position = _swig_property(LeapPython.Pointable_stabilized_tip_position_get)
 
 time_visible = _swig_property(LeapPython.Pointable_time_visible_get)
 
 tip_position = _swig_property(LeapPython.Pointable_tip_position_get)
 
 tip_velocity = _swig_property(LeapPython.Pointable_tip_velocity_get)
 
 touch_distance = _swig_property(LeapPython.Pointable_touch_distance_get)
 
 touch_zone = _swig_property(LeapPython.Pointable_touch_zone_get)
 
 width = _swig_property(LeapPython.Pointable_width_get)
 
 ZONE_HOVERING = LeapPython.Pointable_ZONE_HOVERING
 
 ZONE_NONE = LeapPython.Pointable_ZONE_NONE
 
 ZONE_TOUCHING = LeapPython.Pointable_ZONE_TOUCHING
 
- 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 Tool class represents a tracked tool.

Tools are Pointable objects that the Leap Motion software has classified as a tool.

Get valid Tool objects from a Frame object.

Leap_Tool.png

Note that Tool objects can be invalid, which means that they do not contain valid tracking data and do not correspond to a physical tool. Invalid Tool objects can be the result of asking for a Tool object using an ID from an earlier frame when no Tool objects with that ID exist in the current frame. A Tool object created from the Tool constructor is also invalid. Test for validity with the Tool::isValid() function.

Since
1.0

Definition at line 1019 of file Leap.h.

Constructor & Destructor Documentation

Leap::Tool::Tool ( ToolImplementation *  )
LEAP_EXPORT Leap::Tool::Tool ( )

Constructs a Tool object.

An uninitialized tool is considered invalid. Get valid Tool objects from a Frame object.

Since
1.0
LEAP_EXPORT Leap::Tool::Tool ( const Pointable )
explicit

If the specified Pointable object represents a tool, creates a copy of it as a Tool object; otherwise, creates an invalid Tool object.

Since
1.0
def Leap.Tool.__init__ (   self,
  args 
)

Definition at line 693 of file Leap.py.

Member Function Documentation

def Leap.Tool.__str__ (   self)

Definition at line 700 of file Leap.py.

static LEAP_EXPORT const Tool& Leap::Tool::invalid ( )
static

Returns an invalid Tool object.

You can use the instance returned by this function in comparisons testing whether a given Tool instance is valid or invalid. (You can also use the Tool::isValid() function.)

Returns
The invalid Tool instance.
Since
1.0
LEAP_EXPORT const char* Leap::Tool::toCString ( ) const
private
std::string Leap::Tool::toString ( ) const
inline

A string containing a brief, human readable description of the Tool object.

Returns
A description of the Tool object as a string.
Since
1.0

Definition at line 1066 of file Leap.h.

Member Data Documentation

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

Definition at line 690 of file Leap.py.

Leap.Tool.__repr__ = _swig_repr
staticprivate

Definition at line 691 of file Leap.py.

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

Definition at line 686 of file Leap.py.

Leap.Tool.__swig_destroy__ = LeapPython.delete_Tool
staticprivate

Definition at line 702 of file Leap.py.

dictionary Leap.Tool.__swig_getmethods__ = {}
staticprivate

Definition at line 687 of file Leap.py.

dictionary Leap.Tool.__swig_setmethods__ = {}
staticprivate

Definition at line 683 of file Leap.py.

Leap.Tool.this

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