Examples of MTFingerInputEvt


Examples of org.mt4j.input.inputData.MTFingerInputEvt

    Long tuioID =  (Long)tuioIDToCursorID.get(sessionID) ;
    if (tuioID != null ){
//      logger.info("TUIO INPUT UPDATE FINGER - TUIO ID: " + sessionID);
      InputCursor c = ActiveCursorPool.getInstance().getActiveCursorByID(tuioID);
      if (c != null){
        MTFingerInputEvt te = new MTFingerInputEvt(this, absoluteX, abosulteY, MTFingerInputEvt.INPUT_UPDATED, c);
        this.enqueueInputEvent(te);
      }else{
//        logger.error("CURSOR NOT IN ACTIVE CURSOR LIST! TUIO ID: " + cursor.getSessionID());
      }
    }
View Full Code Here

Examples of org.mt4j.input.inputData.MTFingerInputEvt

      Long lCursorID = tuioIDToCursorID.get(sessionID);
      if (lCursorID != null){
        long cursorID = (long)lCursorID;
        InputCursor c = ActiveCursorPool.getInstance().getActiveCursorByID(cursorID);
        if (c != null){
          MTFingerInputEvt te = new MTFingerInputEvt(this, absoluteX, abosulteY, MTFingerInputEvt.INPUT_ENDED, c);
          tuioIDToCursorID.remove(sessionID);
          ActiveCursorPool.getInstance().removeCursor(cursorID);
          this.enqueueInputEvent(te);
        }else{
//          logger.info("ERROR WHEN REMOVING FINGER - TUIO ID: " + cursor.getSessionID() + " - Cursor not in active cursor pool!");
View Full Code Here

Examples of org.mt4j.input.inputData.MTFingerInputEvt

   * @param e the e
   */
  private void fingerDown(KeyEvent e){
    if (!spaceHasBeenPressed){
      InputCursor m = new InputCursor();
      MTFingerInputEvt touchEvt = new MTFingerInputEvt(this, locationX, locationY, MTFingerInputEvt.INPUT_DETECTED, m);
//      m.addEvent(touchEvt);
     
      lastUsedKeybID = m.getId();
      ActiveCursorPool.getInstance().putActiveCursor(lastUsedKeybID, m);
     
      //FIRE
      this.enqueueInputEvent(touchEvt);
     
    spaceHasBeenPressed = true;
    }else{
      InputCursor m = ActiveCursorPool.getInstance().getActiveCursorByID(lastUsedKeybID);
     
//      if (m.getLastEvent().getPositionX() != locationX || m.getLastEvent().getPositionY() != locationY){
      MTFingerInputEvt te = new MTFingerInputEvt(this, locationX, locationY, MTFingerInputEvt.INPUT_UPDATED, m);
//      m.addEvent(new MTFingerInputEvt2(this, e.getX(), e.getY(), MTFingerInputEvt.FINGER_UPDATE, m));
     
      //FIRE
      this.enqueueInputEvent(te);
//      }
View Full Code Here

Examples of org.mt4j.input.inputData.MTFingerInputEvt

   *
   * @param e the e
   */
  private void fingerUp(KeyEvent e) {
    InputCursor m = ActiveCursorPool.getInstance().getActiveCursorByID(lastUsedKeybID);
    MTFingerInputEvt te = new MTFingerInputEvt(this, locationX, locationY, MTFingerInputEvt.INPUT_ENDED, m);
//    m.addEvent(te);
   
    this.enqueueInputEvent(te);
   
    ActiveCursorPool.getInstance().removeCursor((lastUsedKeybID));
View Full Code Here

Examples of org.mt4j.input.inputData.MTFingerInputEvt

 
  @Override
  public void preProcess(MTInputEvent inputEvent) {
    super.preProcess(inputEvent);
   
    MTFingerInputEvt posEvt = (MTFingerInputEvt)inputEvent;
    InputCursor c = posEvt.getCursor();
    switch (posEvt.getId()) {
    case MTFingerInputEvt.INPUT_DETECTED:
      activeCursors.add(c);
      activeCursorsWithEndedOnes.add(c);
      c.registerForLocking(this);
      break;
View Full Code Here

Examples of org.mt4j.input.inputData.MTFingerInputEvt

  }

  @Override
  protected void processInputEvtImpl(MTInputEvent inputEvent) {
//    AbstractCursorInputEvt posEvt = (AbstractCursorInputEvt)inputEvent;
    MTFingerInputEvt posEvt = (MTFingerInputEvt)inputEvent;
    InputCursor c = posEvt.getCursor();
    switch (posEvt.getId()) {
    case MTFingerInputEvt.INPUT_DETECTED:
//      activeCursors.add(c);
//      c.registerGeneralInterest(this);
      cursorStarted(c, posEvt);
      break;
View Full Code Here

Examples of org.mt4j.input.inputData.MTFingerInputEvt

   */
  public void newMotionProvided(Motion motion) {
    MotionEvent me = motion.getLastEvent();
   
    InputCursor m = new InputCursor();
    MTFingerInputEvt touchEvt = new MTFingerInputEvt(this, me.getXAbs(), me.getYAbs(), MTFingerInputEvt.INPUT_DETECTED, m);
//    m.addEvent(touchEvt);
   
    long motionID = motion.getId();
    ActiveCursorPool.getInstance().putActiveCursor(motionID, m);
    muitoIDToInputMotionID.put(motionID, motionID);
View Full Code Here

Examples of org.mt4j.input.inputData.MTFingerInputEvt

   * @see muito.motion.MotionProviderListener#providedMotionUpdated(muito.motion.Motion, muito.motion.MotionEvent)
   */
  public void providedMotionUpdated(Motion m, MotionEvent me) {
    InputCursor mo = ActiveCursorPool.getInstance().getActiveCursorByID(muitoIDToInputMotionID.get(m.getId()));
   
    MTFingerInputEvt te = new MTFingerInputEvt(this, me.getXAbs(), me.getYAbs(), MTFingerInputEvt.INPUT_UPDATED, mo);
//    m.addEvent(new MTFingerInputEvt2(this, e.getX(), e.getY(), MTFingerInputEvt.FINGER_UPDATE, m));
   
    //FIRE
    this.enqueueInputEvent(te);
  }
View Full Code Here

Examples of org.mt4j.input.inputData.MTFingerInputEvt

   */
  public void providedMotionCompleted(Motion m) {
    long motionID = muitoIDToInputMotionID.get(m.getId());
    InputCursor mo = ActiveCursorPool.getInstance().getActiveCursorByID(motionID);

    MTFingerInputEvt te;
    if (mo.getCurrentEvent() != null)
      te = new MTFingerInputEvt(this, mo.getCurrentEvent().getPosX(), mo.getCurrentEvent().getPosY(), MTFingerInputEvt.INPUT_ENDED, mo);
    else
      te = new MTFingerInputEvt(this, 0,0, MTFingerInputEvt.INPUT_ENDED, mo);
   
//    m.addEvent(te);
   
    this.enqueueInputEvent(te);
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.