Package org.mt4j.input.inputProcessors.componentProcessors.arcballProcessor

Examples of org.mt4j.input.inputProcessors.componentProcessors.arcballProcessor.ArcBallGestureEvent


    meshGroup.setComposite(true); //-> Group gets picked instead of its children
    meshGroup.registerInputProcessor(new ArcballProcessor(mtApplication, biggestMesh));
    meshGroup.addGestureListener(ArcballProcessor.class, new IGestureEventListener(){
      //@Override
      public boolean processGestureEvent(MTGestureEvent ge) {
        ArcBallGestureEvent aEvt =  (ArcBallGestureEvent)ge;
        meshGroup.transform(aEvt.getTransformationMatrix());
        return false;
      }
    });
   
    meshGroup.registerInputProcessor(new ScaleProcessor(mtApplication));
View Full Code Here


  /* (non-Javadoc)
   * @see org.mt4j.input.inputProcessors.IGestureEventListener#processGestureEvent(org.mt4j.input.inputProcessors.MTGestureEvent)
   */
  //@Override
  public boolean processGestureEvent(MTGestureEvent g) {
    ArcBallGestureEvent aEvt =  (ArcBallGestureEvent)g;
   
    if (!useCustomTarget)
      target = aEvt.getTargetComponent();
   
    if (target instanceof MTComponent){
      ((MTComponent)target).sendToFront();
    }
   
    if (aEvt.getId() == ArcBallGestureEvent.GESTURE_UPDATED){
      if (target instanceof MTComponent){
        MTComponent comp = (MTComponent)target;
        comp.transform(aEvt.getTransformationMatrix());
      }
    }
    return false;
  }
View Full Code Here

TOP

Related Classes of org.mt4j.input.inputProcessors.componentProcessors.arcballProcessor.ArcBallGestureEvent

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.