de.voidplus.leapmotion
Class Pointable

java.lang.Object
  extended by de.voidplus.leapmotion.Pointable
Direct Known Subclasses:
Finger, Tool

public class Pointable
extends Object


Constructor Summary
Pointable(PApplet parent, LeapMotion leap, com.leapmotion.leap.Pointable pointable)
           
 
Method Summary
 void draw()
           
 void draw(float radius)
          Draw the finger with all details.
 PVector getDirection()
          The direction in which this finger is pointing.
 int getId()
          Get the unique ID.
 float getLength()
          The estimated length of the finger or tool in millimeters.
 PVector getPosition()
          The tip position in millimeters.
 PVector getRawPosition()
          Raw data of the tip position.
 PVector getRawStabilizedPosition()
          Raw data of the stabilized tip position.
 PVector getRawVelocity()
          Raw data of the rate of change of the tip position.
 PVector getStabilizedPosition()
          The stabilized tip position in millimeters.
 float getTimeVisible()
          The duration of time this Pointable has been visible to the Leap Motion Controller.
 float getTouchDistance()
          A value proportional to the distance between this Pointable object and the adaptive touch plane.
 int getTouchZone()
          The current touch zone of this Pointable object.
 PVector getVelocity()
          The rate of change of the tip position in millimeters/second.
 boolean isValid()
          Reports whether this is a valid Pointable object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pointable

public Pointable(PApplet parent,
                 LeapMotion leap,
                 com.leapmotion.leap.Pointable pointable)
Method Detail

getId

public int getId()
Get the unique ID.

Returns:

getPosition

public PVector getPosition()
The tip position in millimeters.

Returns:

getRawPosition

public PVector getRawPosition()
Raw data of the tip position.

Returns:

getStabilizedPosition

public PVector getStabilizedPosition()
The stabilized tip position in millimeters.

Returns:

getRawStabilizedPosition

public PVector getRawStabilizedPosition()
Raw data of the stabilized tip position.

Returns:

getVelocity

public PVector getVelocity()
The rate of change of the tip position in millimeters/second.

Returns:

getRawVelocity

public PVector getRawVelocity()
Raw data of the rate of change of the tip position.

Returns:

getDirection

public PVector getDirection()
The direction in which this finger is pointing.

Returns:

getTouchDistance

public float getTouchDistance()
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.

getTouchZone

public int getTouchZone()
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: -1 = Zone.NONE Ð The Pointable is outside the hovering zone. 0 = Zone.HOVERING Ð The Pointable is close to, but not touching the touch plane. 1 = 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

getLength

public float getLength()
The estimated length of the finger or tool in millimeters.

Returns:

getTimeVisible

public float getTimeVisible()
The duration of time this Pointable has been visible to the Leap Motion Controller.

Returns:

isValid

public boolean isValid()
Reports whether this is a valid Pointable object.

Returns:

draw

public void draw(float radius)
Draw the finger with all details.

Parameters:
radius - The radius of the ellipse (2D) or sphere (3D).

draw

public void draw()


Processing library LeapMotionForProcessing by Darius Morawiec. (C) 2013