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 &) |
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.
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
A value proportional to the distance between this Pointable object and the adaptive touch plane.
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