}
//Register arcball gesture manipulation to the whole mesh-group
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));
meshGroup.addGestureListener(ScaleProcessor.class, new IGestureEventListener(){
//@Override
public boolean processGestureEvent(MTGestureEvent ge) {
ScaleEvent se = (ScaleEvent)ge;
meshGroup.scaleGlobal(se.getScaleFactorX(), se.getScaleFactorY(), se.getScaleFactorX(), biggestMesh.getCenterPointGlobal());
return false;