de.voidplus.leapmotion
Class Hand

java.lang.Object
  extended by de.voidplus.leapmotion.Hand

public class Hand
extends Object


Constructor Summary
Hand(PApplet parent, LeapMotion leap, com.leapmotion.leap.Hand hand)
           
 
Method Summary
 int countFingers()
          Get the number of fingers.
 int countTools()
          Get the number of tools.
 void draw()
           
 void draw(float radius)
          Draw the hand with all details.
 PVector getDirection()
          The direction from the palm position toward the fingers.
 PVector getDynamics()
          Get the angles of the hand (x=roll, y=pich, z=yaw).
 ArrayList<Finger> getFingers()
          Get all detected fingers of the hand.
 Finger getFrontFinger()
          The member of the list that is farthest to the front within the standard Leap Motion frame of reference (i.e has the smallest Z coordinate).
 Tool getFrontTool()
          The member of the list that is farthest to the front within the standard Leap Motion frame of reference (i.e has the smallest Z coordinate).
 int getId()
          Get the unique ID.
 Finger getLeftFinger()
          The member of the list that is farthest to the left within the standard Leap Motion frame of reference (i.e has the smallest X coordinate).
 Tool getLeftTool()
          The member of the list that is farthest to the left within the standard Leap Motion frame of reference (i.e has the smallest X coordinate).
 PVector getPalmPosition()
          The center position of the palm in millimeters.
 float getPitch()
          Get the pitch angle (y).
 PVector getPosition()
          The center position of the palm in millimeters.
 PVector getRawDirection()
          Raw data of the direction from the palm position toward the fingers.
 PVector getRawPosition()
          Raw data of the center position.
 PVector getRawSpherePosition()
          Raw data of the center of a sphere fit to the curvature of this hand.
 PVector getRawStabilizedParlmPosition()
          Raw data of the stabilized center position.
 PVector getRawStabilizedPosition()
          Raw data of the stabilized center position.
 Finger getRightFinger()
          The member of the list that is farthest to the right within the standard Leap Motion frame of reference (i.e has the largest X coordinate).
 Tool getRightTool()
          The member of the list that is farthest to the right within the standard Leap Motion frame of reference (i.e has the largest X coordinate).
 float getRoll()
          Get the roll angle (x).
 PVector getSpherePosition()
          The center of a sphere fit to the curvature of this hand.
 float getSphereRadius()
          The radius of a sphere fit to the curvature of this hand.
 PVector getStabilizedPalmPosition()
          The stabilized center position of the palm in millimeters.
 PVector getStabilizedPosition()
          The stabilized center position of the palm in millimeters.
 float getTimeVisible()
          The duration of time this Hand has been visible to the Leap Motion Controller.
 ArrayList<Tool> getTools()
          Get all detected tools of the hand.
 float getYaw()
          Get the yaw angle (z).
 boolean hasFingers()
          Check if there is any finger.
 boolean hasTools()
          Check if there is any tool.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hand

public Hand(PApplet parent,
            LeapMotion leap,
            com.leapmotion.leap.Hand hand)
Method Detail

getId

public int getId()
Get the unique ID.

Returns:

getPosition

public PVector getPosition()
The center position of the palm in millimeters.

Returns:

getRawPosition

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

Returns:

getPalmPosition

public PVector getPalmPosition()
The center position of the palm in millimeters.

Returns:

getStabilizedPosition

public PVector getStabilizedPosition()
The stabilized center position of the palm in millimeters.

Returns:

getStabilizedPalmPosition

public PVector getStabilizedPalmPosition()
The stabilized center position of the palm in millimeters.

Returns:

getRawStabilizedPosition

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

Returns:

getRawStabilizedParlmPosition

public PVector getRawStabilizedParlmPosition()
Raw data of the stabilized center position.

Returns:

getDirection

public PVector getDirection()
The direction from the palm position toward the fingers.

Returns:

getRawDirection

public PVector getRawDirection()
Raw data of the direction from the palm position toward the fingers.

Returns:

getTimeVisible

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

Returns:

getFrontFinger

public Finger getFrontFinger()
The member of the list that is farthest to the front within the standard Leap Motion frame of reference (i.e has the smallest Z coordinate).

Returns:

getLeftFinger

public Finger getLeftFinger()
The member of the list that is farthest to the left within the standard Leap Motion frame of reference (i.e has the smallest X coordinate).

Returns:

getRightFinger

public Finger getRightFinger()
The member of the list that is farthest to the right within the standard Leap Motion frame of reference (i.e has the largest X coordinate).

Returns:

getFrontTool

public Tool getFrontTool()
The member of the list that is farthest to the front within the standard Leap Motion frame of reference (i.e has the smallest Z coordinate).

Returns:

getLeftTool

public Tool getLeftTool()
The member of the list that is farthest to the left within the standard Leap Motion frame of reference (i.e has the smallest X coordinate).

Returns:

getRightTool

public Tool getRightTool()
The member of the list that is farthest to the right within the standard Leap Motion frame of reference (i.e has the largest X coordinate).

Returns:

draw

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

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

draw

public void draw()

getDynamics

public PVector getDynamics()
Get the angles of the hand (x=roll, y=pich, z=yaw).

Returns:

getRoll

public float getRoll()
Get the roll angle (x).

Returns:

getPitch

public float getPitch()
Get the pitch angle (y).

Returns:

getYaw

public float getYaw()
Get the yaw angle (z).

Returns:

getSpherePosition

public PVector getSpherePosition()
The center of a sphere fit to the curvature of this hand.

Returns:

getRawSpherePosition

public PVector getRawSpherePosition()
Raw data of the center of a sphere fit to the curvature of this hand.

Returns:

getSphereRadius

public float getSphereRadius()
The radius of a sphere fit to the curvature of this hand.

Returns:

getFingers

public ArrayList<Finger> getFingers()
Get all detected fingers of the hand.

Returns:

hasFingers

public boolean hasFingers()
Check if there is any finger.

Returns:

countFingers

public int countFingers()
Get the number of fingers.

Returns:

getTools

public ArrayList<Tool> getTools()
Get all detected tools of the hand.

Returns:

hasTools

public boolean hasTools()
Check if there is any tool.

Returns:

countTools

public int countTools()
Get the number of tools.

Returns:


Processing library LeapMotionForProcessing by Darius Morawiec. (C) 2013