Package com.leapmotion.leap

Examples of com.leapmotion.leap.Hand


    this.lastDetectedHand = new HashMap<Integer, Hand>();
    this.lastDetectedTool = new HashMap<Integer, Tool>();

    this.lastDetectedFinger.put(0, new Finger());
    this.lastDetectedPointable.put(0, new Pointable());
    this.lastDetectedHand.put(0, new Hand());
    this.lastDetectedTool.put(0, new Tool());

    // this is neccessary because the velocity of all objects has an offset.
    this.velocityOffsetTestFinger = new Finger();
  }
View Full Code Here


  public PVector getFingerPositionXYPlane() {
    PVector fingerPositionXYPlane = new PVector();

    Frame frame = getFrame();
    if (frame.hands().isEmpty() == false) {
      Hand hand = frame.hands().get(0);
      if (hand.fingers().isEmpty() == false) {
        Finger finger = hand.fingers().get(0);
        fingerPositionXYPlane.x = transformLeapToScreenX(finger.tipPosition().getX());
        fingerPositionXYPlane.y = transformLeapToScreenY(finger.tipPosition().getY());
      }
    }
View Full Code Here

   *
   * @param handNr nr of the hand
   * @return
   */
  public Hand getHand(int handNr) {
    Hand returnHand = null;
    if (!getHandList().isEmpty()) {
      this.lastDetectedHand.put(handNr, getHandList().get(handNr));
    }
    // returnHand = lastDetectedHand.get(handNr);
    int downCounter = 0;
View Full Code Here

   * @param id
   * @param frame
   * @return
   */
  public Hand getHandById(int id, Frame frame) {
    Hand returnHand = null;
    for (Hand hand : getHandList(frame)) {
      if (hand.id() == id) {
        returnHand = hand;
      }
    }
View Full Code Here

TOP

Related Classes of com.leapmotion.leap.Hand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.