Package com.sun.j3d.utils.behaviors.mouse

Examples of com.sun.j3d.utils.behaviors.mouse.MouseTranslate


        MouseRotate behavior2 = new MouseRotate(rotateTrans);
        behavior2.setFactor(-0.002, 0.0);
        controllers.addChild(behavior2);
        behavior2.setSchedulingBounds(BoardModel.bounds);

        MouseTranslate behavior3 = new MouseTranslate(panTrans);
        behavior3.setFactor(-0.5);
        controllers.addChild(behavior3);
        behavior3.setSchedulingBounds(BoardModel.bounds);
        behavior3.setupCallback(this);

        KeyNavigatorBehavior behavior4 = new KeyNavigatorBehavior(panTrans);
        controllers.addChild(behavior4);
        behavior4.setSchedulingBounds(BoardModel.bounds);
    }
View Full Code Here


        behavior2.setFactor(-0.002, 0.0);
        controllers.addChild(behavior2);
        behavior2.setSchedulingBounds(BoardModel.bounds);

        // FIXME: rotate pan direction with rotateTrans
        MouseTranslate behavior3 = new MouseTranslate(panTrans);
        behavior3.setFactor(-0.5);
        controllers.addChild(behavior3);
        behavior3.setSchedulingBounds(BoardModel.bounds);
    }
View Full Code Here

            mouseZoom.setSchedulingBounds(_bounds);
            _branchRoot.addChild(mouseZoom);
        }

        if (_isTranslatable()) {
            MouseTranslate mouseTranslate = new MouseTranslate();
            mouseTranslate.setTransformGroup(_userTransformation);
            _userTransformation.addChild(mouseTranslate);
            mouseTranslate.setSchedulingBounds(_bounds);
        }

        // FIXME: should implement this so that user can dynamically
        // modify this value during design-time and run-time
        // right now this is only user-changeable during initialization
View Full Code Here

    private void addNavigators() {
        KeyNavigatorBehavior navigator = createKeyboardNavigator();
        root.addChild(navigator);
        // MouseRotate mouseRotateNavigator = createMouseRotateNavigator();
        // root.addChild(mouseRotateNavigator);
        MouseTranslate mouseTranslateNavigator = createMouseTranslateNavigator();
        root.addChild(mouseTranslateNavigator);
        MouseZoom mouseZoomNavigator = createMouseZoomNavigator();
        root.addChild(mouseZoomNavigator);
    }
View Full Code Here

    // mouseRotateNavigator.setFactor(0.003);
    // return mouseRotateNavigator;
    // }

    private MouseTranslate createMouseTranslateNavigator() {
        MouseTranslate mouseTranslateNavigator = new MouseTranslate(MouseBehavior.INVERT_INPUT);
        mouseTranslateNavigator.setTransformGroup(viewTransform);
        mouseTranslateNavigator.setSchedulingBounds(BOUNDS_FOR_ALL);
        return mouseTranslateNavigator;
    }
View Full Code Here

    private void addNavigators() {
        KeyNavigatorBehavior navigator = createKeyboardNavigator();
        root.addChild(navigator);
        // MouseRotate mouseRotateNavigator = createMouseRotateNavigator();
        // root.addChild(mouseRotateNavigator);
        MouseTranslate mouseTranslateNavigator = createMouseTranslateNavigator();
        root.addChild(mouseTranslateNavigator);
        MouseZoom mouseZoomNavigator = createMouseZoomNavigator();
        root.addChild(mouseZoomNavigator);
    }
View Full Code Here

    // mouseRotateNavigator.setFactor(0.003);
    // return mouseRotateNavigator;
    // }

    private MouseTranslate createMouseTranslateNavigator() {
        MouseTranslate mouseTranslateNavigator = new MouseTranslate(MouseBehavior.INVERT_INPUT);
        mouseTranslateNavigator.setTransformGroup(viewTransform);
        mouseTranslateNavigator.setSchedulingBounds(BOUNDS_FOR_ALL);
        return mouseTranslateNavigator;
    }
View Full Code Here

/*     */   private TransformGroup currentTG;
/*     */
/*     */   public PickTranslateBehavior(BranchGroup root, Canvas3D canvas, Bounds bounds)
/*     */   {
/*  70 */     super(canvas, root, bounds);
/*  71 */     this.translate = new MouseTranslate(1);
/*  72 */     this.translate.setTransformGroup(this.currGrp);
/*  73 */     this.currGrp.addChild(this.translate);
/*  74 */     this.translate.setSchedulingBounds(bounds);
/*  75 */     setSchedulingBounds(bounds);
/*     */   }
View Full Code Here

/*     */   }
/*     */
/*     */   public PickTranslateBehavior(BranchGroup root, Canvas3D canvas, Bounds bounds, int pickMode)
/*     */   {
/*  90 */     super(canvas, root, bounds);
/*  91 */     this.translate = new MouseTranslate(1);
/*  92 */     this.translate.setTransformGroup(this.currGrp);
/*  93 */     this.currGrp.addChild(this.translate);
/*  94 */     this.translate.setSchedulingBounds(bounds);
/*  95 */     setSchedulingBounds(bounds);
/*  96 */     setMode(pickMode);
View Full Code Here

/*     */   private TransformGroup currentTG;
/*     */
/*     */   public PickTranslateBehavior(BranchGroup root, Canvas3D canvas, Bounds bounds)
/*     */   {
/*  75 */     super(canvas, root, bounds);
/*  76 */     this.translate = new MouseTranslate(1);
/*  77 */     this.translate.setTransformGroup(this.currGrp);
/*  78 */     this.currGrp.addChild(this.translate);
/*  79 */     this.translate.setSchedulingBounds(bounds);
/*  80 */     setSchedulingBounds(bounds);
/*     */   }
View Full Code Here

TOP

Related Classes of com.sun.j3d.utils.behaviors.mouse.MouseTranslate

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.