Package com.leapmotion.leap

Examples of com.leapmotion.leap.Finger


    this.lastDetectedFinger = new HashMap<Integer, Finger>();
    this.lastDetectedPointable = new HashMap<Integer, Pointable>();
    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


    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());
      }
    }

    return fingerPositionXYPlane;
  }
View Full Code Here

   *
   * @param fingerNr
   * @return
   */
  public Finger getFinger(int fingerNr) {
    Finger returnFinger = null;
    if (getFingerList().size() > fingerNr) {
      this.lastDetectedFinger.put(fingerNr, getFingerList().get(fingerNr));
    }
    // returnFinger = lastDetectedFinger.get(fingerNr);
    int downCounter = 0;
View Full Code Here

   * @param id
   * @param frame
   * @return
   */
  public Finger getFingerById(int id, Frame frame) {
    Finger returnFinger = null;
    for (Finger finger : getFingerList(frame)) {
      if (finger.id() == id) {
        returnFinger = finger;
      }
    }
View Full Code Here

TOP

Related Classes of com.leapmotion.leap.Finger

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.