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

#include <Leap.h>

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

List of all members.

Public Types

enum  Zone { ZONE_NONE = 0, ZONE_HOVERING = 1, ZONE_TOUCHING = 2 }

Public Member Functions

def __eq__
def __init__
def __ne__
def __str__
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

Static Public Member Functions

static LEAP_EXPORT const
Pointable
invalid ()

Public Attributes

 this

Static Public Attributes

tuple direction = _swig_property(LeapPython.Pointable_direction_get)
tuple frame = _swig_property(LeapPython.Pointable_frame_get)
tuple hand = _swig_property(LeapPython.Pointable_hand_get)
tuple id = _swig_property(LeapPython.Pointable_id_get)
tuple is_extended = _swig_property(LeapPython.Pointable_is_extended_get)
tuple is_finger = _swig_property(LeapPython.Pointable_is_finger_get)
tuple is_tool = _swig_property(LeapPython.Pointable_is_tool_get)
tuple is_valid = _swig_property(LeapPython.Pointable_is_valid_get)
tuple length = _swig_property(LeapPython.Pointable_length_get)
tuple stabilized_tip_position = _swig_property(LeapPython.Pointable_stabilized_tip_position_get)
tuple time_visible = _swig_property(LeapPython.Pointable_time_visible_get)
tuple tip_position = _swig_property(LeapPython.Pointable_tip_position_get)
tuple tip_velocity = _swig_property(LeapPython.Pointable_tip_velocity_get)
tuple touch_distance = _swig_property(LeapPython.Pointable_touch_distance_get)
tuple touch_zone = _swig_property(LeapPython.Pointable_touch_zone_get)
tuple 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

Private Member Functions

LEAP_EXPORT const char * toCString () const

Static Private Attributes

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

Friends

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

Detailed Description

The Pointable class reports the physical characteristics of a detected finger or tool.

Both fingers and tools are classified as Pointable objects. Use the Pointable::isFinger() function to determine whether a Pointable object represents a finger. Use the Pointable::isTool() function to determine whether a Pointable object represents a tool. The Leap Motion software classifies a detected entity as a tool when it is thinner, straighter, and longer than a typical finger.

To provide touch emulation, the Leap Motion software associates a floating touch plane that adapts to the user's finger movement and hand posture. The Leap Motion interprets purposeful movements toward this plane as potential touch points. The Pointable class reports touch state with the touchZone and touchDistance values.

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

Since:
1.0

Definition at line 129 of file Leap.h.


Member Enumeration Documentation

Defines the values for reporting the state of a Pointable object in relation to an adaptive touch plane.

Since:
1.0
Enumerator:
ZONE_NONE 

The Pointable object is too far from the plane to be considered hovering or touching.

Since:
1.0
ZONE_HOVERING 

The Pointable object is close to, but not touching the plane.

Since:
1.0
ZONE_TOUCHING 

The Pointable has penetrated the plane.

Since:
1.0

Definition at line 137 of file Leap.h.


Constructor & Destructor Documentation

Leap::Pointable::Pointable ( PointableImplementation *  )
Leap::Pointable::Pointable ( FingerImplementation *  )
Leap::Pointable::Pointable ( ToolImplementation *  )

Constructs a Pointable object.

An uninitialized pointable is considered invalid. Get valid Pointable objects from a Frame or a Hand object.

Since:
1.0
def Leap::Pointable::__init__ (   self)

Definition at line 453 of file Leap.py.


Member Function Documentation

def Leap::Pointable::__eq__ (   self,
  arg2 
)

Definition at line 460 of file Leap.py.

def Leap::Pointable::__ne__ (   self,
  arg2 
)

Definition at line 463 of file Leap.py.

def Leap::Pointable::__str__ (   self)

Reimplemented in Leap::Tool, and Leap::Finger.

Definition at line 466 of file Leap.py.

The direction in which this finger or tool is pointing.

The direction is expressed as a unit vector pointing in the same direction as the tip.

Leap_Finger_Model.png
Returns:
The Vector pointing in the same direction as the tip of this Pointable object.
Since:
1.0

The Frame associated with this Pointable object.

Returns:
The associated Frame object, if available; otherwise, an invalid Frame object is returned.
Since:
1.0

The Hand associated with a finger.

Not that in version 2+, tools are not associated with hands. For tools, this function always returns an invalid Hand object.

Returns:
The associated Hand object, if available; otherwise, an invalid Hand object is returned.
Since:
1.0
LEAP_EXPORT int32_t Leap::Pointable::id ( ) const

A unique ID assigned to this Pointable object, whose value remains the same across consecutive frames while the tracked finger or tool remains visible. If tracking is lost (for example, when a finger is occluded by another finger or when it is withdrawn from the Leap Motion Controller field of view), the Leap Motion software may assign a new ID when it detects the entity in a future frame.

Use the ID value with the Frame::pointable() function to find this Pointable object in future frames.

IDs should be from 1 to 100 (inclusive). If more than 100 objects are tracked an IDs of -1 will be used until an ID in the defined range is available.

Returns:
The ID assigned to this Pointable object.
Since:
1.0
static LEAP_EXPORT const Pointable& Leap::Pointable::invalid ( ) [static]

Returns an invalid Pointable object.

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

Returns:
The invalid Pointable instance.
Since:
1.0

Reimplemented in Leap::Tool, and Leap::Finger.

Whether or not this Pointable is in an extended posture.

A finger is considered extended if it is extended straight from the hand as if pointing. A finger is not extended when it is bent down and curled towards the palm. Tools are always extended.

Returns:
True, if the pointable is extended.
Since:
2.0

Whether or not this Pointable is classified as a finger.

Returns:
True, if this Pointable is classified as a finger.
Since:
1.0

Whether or not this Pointable is classified as a tool.

Returns:
True, if this Pointable is classified as a tool.
Since:
1.0

Reports whether this is a valid Pointable object.

Returns:
True, if this Pointable object contains valid tracking data.
Since:
1.0

The estimated length of the finger or tool in millimeters.

Returns:
The estimated length of this Pointable object.
Since:
1.0
LEAP_EXPORT bool Leap::Pointable::operator!= ( const Pointable ) const

Compare Pointable object inequality.

Two Pointable objects are equal if and only if both Pointable objects represent the exact same physical entities in the same frame and both Pointable objects are valid.

Since:
1.0
LEAP_EXPORT bool Leap::Pointable::operator== ( const Pointable ) const

Compare Pointable object equality.

Two Pointable objects are equal if and only if both Pointable objects represent the exact same physical entities in the same frame and both Pointable objects are valid.

Since:
1.0

The stabilized tip position of this Pointable.

Smoothing and stabilization is performed in order to make this value more suitable for interaction with 2D content. The stabilized position lags behind the tip position by a variable amount, depending primarily on the speed of movement.

Returns:
A modified tip position of this Pointable object with some additional smoothing and stabilization applied.
Since:
1.0

The duration of time this Pointable has been visible to the Leap Motion Controller.

Returns:
The duration (in seconds) that this Pointable has been tracked.
Since:
1.0

The tip position in millimeters from the Leap Motion origin.

Returns:
The Vector containing the coordinates of the tip position.
Since:
1.0

The rate of change of the tip position in millimeters/second.

Returns:
The Vector containing the coordinates of the tip velocity.
Since:
1.0
LEAP_EXPORT const char* Leap::Pointable::toCString ( ) const [private]

Reimplemented in Leap::Tool, and Leap::Finger.

std::string Leap::Pointable::toString ( ) const [inline]

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

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

Reimplemented in Leap::Tool, and Leap::Finger.

Definition at line 455 of file Leap.h.

A value proportional to the distance between this Pointable object and the adaptive touch plane.

Leap_Touch_Plane.png

The touch distance is a value in the range [-1, 1]. The value 1.0 indicates the Pointable is at the far edge of the hovering zone. The value 0 indicates the Pointable is just entering the touching zone. A value of -1.0 indicates the Pointable is firmly within the touching zone. Values in between are proportional to the distance from the plane. Thus, the touchDistance of 0.5 indicates that the Pointable is halfway into the hovering zone.

You can use the touchDistance value to modulate visual feedback given to the user as their fingers close in on a touch target, such as a button.

Returns:
The normalized touch distance of this Pointable object.
Since:
1.0

The current touch zone of this Pointable object.

The Leap Motion software computes the touch zone based on a floating touch plane that adapts to the user's finger movement and hand posture. The Leap Motion software interprets purposeful movements toward this plane as potential touch points. When a Pointable moves close to the adaptive touch plane, it enters the "hovering" zone. When a Pointable reaches or passes through the plane, it enters the "touching" zone.

The possible states are present in the Zone enum of this class:

**Zone.NONE** -- The Pointable is outside the hovering zone.

**Zone.HOVERING** -- The Pointable is close to, but not touching the touch plane.

**Zone.TOUCHING** -- The Pointable has penetrated the touch plane.

The touchDistance value provides a normalized indication of the distance to the touch plane when the Pointable is in the hovering or touching zones.

Returns:
The touch zone of this Pointable
Since:
1.0

The estimated width of the finger or tool in millimeters.

Returns:
The estimated width of this Pointable object.
Since:
1.0

Friends And Related Function Documentation

LEAP_EXPORT friend std::ostream& operator<< ( std::ostream &  ,
const Pointable  
) [friend]

Writes a brief, human readable description of the Pointable object to an output stream.

Since:
1.0

Member Data Documentation

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

Reimplemented from Leap::Interface.

Reimplemented in Leap::Tool, and Leap::Finger.

Definition at line 447 of file Leap.py.

Reimplemented in Leap::Tool, and Leap::Finger.

Definition at line 448 of file Leap.py.

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

Reimplemented from Leap::Interface.

Reimplemented in Leap::Tool, and Leap::Finger.

Definition at line 443 of file Leap.py.

Leap::Pointable::__swig_destroy__ = LeapPython.delete_Pointable [static, private]

Reimplemented in Leap::Tool, and Leap::Finger.

Definition at line 516 of file Leap.py.

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

Reimplemented from Leap::Interface.

Reimplemented in Leap::Tool, and Leap::Finger.

Definition at line 444 of file Leap.py.

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

Reimplemented from Leap::Interface.

Reimplemented in Leap::Tool, and Leap::Finger.

Definition at line 440 of file Leap.py.

tuple Leap::Pointable::direction = _swig_property(LeapPython.Pointable_direction_get) [static]

Definition at line 482 of file Leap.py.

tuple Leap::Pointable::frame = _swig_property(LeapPython.Pointable_frame_get) [static]

Definition at line 515 of file Leap.py.

tuple Leap::Pointable::hand = _swig_property(LeapPython.Pointable_hand_get) [static]

Definition at line 473 of file Leap.py.

tuple Leap::Pointable::id = _swig_property(LeapPython.Pointable_id_get) [static]

Definition at line 470 of file Leap.py.

tuple Leap::Pointable::is_extended = _swig_property(LeapPython.Pointable_is_extended_get) [static]

Definition at line 497 of file Leap.py.

tuple Leap::Pointable::is_finger = _swig_property(LeapPython.Pointable_is_finger_get) [static]

Definition at line 494 of file Leap.py.

tuple Leap::Pointable::is_tool = _swig_property(LeapPython.Pointable_is_tool_get) [static]

Definition at line 491 of file Leap.py.

tuple Leap::Pointable::is_valid = _swig_property(LeapPython.Pointable_is_valid_get) [static]

Definition at line 500 of file Leap.py.

tuple Leap::Pointable::length = _swig_property(LeapPython.Pointable_length_get) [static]

Definition at line 488 of file Leap.py.

tuple Leap::Pointable::stabilized_tip_position = _swig_property(LeapPython.Pointable_stabilized_tip_position_get) [static]

Definition at line 509 of file Leap.py.

Reimplemented in Leap::Tool, and Leap::Finger.

Definition at line 453 of file Leap.py.

tuple Leap::Pointable::time_visible = _swig_property(LeapPython.Pointable_time_visible_get) [static]

Definition at line 512 of file Leap.py.

tuple Leap::Pointable::tip_position = _swig_property(LeapPython.Pointable_tip_position_get) [static]

Definition at line 476 of file Leap.py.

tuple Leap::Pointable::tip_velocity = _swig_property(LeapPython.Pointable_tip_velocity_get) [static]

Definition at line 479 of file Leap.py.

tuple Leap::Pointable::touch_distance = _swig_property(LeapPython.Pointable_touch_distance_get) [static]

Definition at line 506 of file Leap.py.

tuple Leap::Pointable::touch_zone = _swig_property(LeapPython.Pointable_touch_zone_get) [static]

Definition at line 503 of file Leap.py.

tuple Leap::Pointable::width = _swig_property(LeapPython.Pointable_width_get) [static]

Definition at line 485 of file Leap.py.

Leap::Pointable::ZONE_HOVERING = LeapPython.Pointable_ZONE_HOVERING [static]

Definition at line 450 of file Leap.py.

Leap::Pointable::ZONE_NONE = LeapPython.Pointable_ZONE_NONE [static]

Definition at line 449 of file Leap.py.

Leap::Pointable::ZONE_TOUCHING = LeapPython.Pointable_ZONE_TOUCHING [static]

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