Examples of MouseRotate


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

        MouseWheelZoom behavior0 = new MouseWheelZoom(zoomTrans);
        behavior0.setFactor(-BoardModel.HEX_DIAMETER/3);
        controllers.addChild(behavior0);
        behavior0.setSchedulingBounds(BoardModel.bounds);

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

        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);
View Full Code Here

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

        r.addChild(p);
        p.addChild(t);
        t.addChild(obj);

        BranchGroup bg = new BranchGroup();
        MouseRotate behavior1 = new MouseRotate(t);
        behavior1.setFactor(0.0, -0.002);
        bg.addChild(behavior1);
        behavior1.setSchedulingBounds(BoardModel.bounds);

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

        bg.addChild(f);

        return bg;
    }
View Full Code Here

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

        behavior0.setFactor(1.0/3);
        behavior0.setupCallback(this);
        controllers.addChild(behavior0);
        behavior0.setSchedulingBounds(BoardModel.bounds);

        MouseRotate behavior2 = new MouseRotate(rotateTrans);
        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);
View Full Code Here

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

   * @param bounds Bounds of your scene.
   **/

  public PickRotateBehavior(BranchGroup root, Canvas3D canvas, Bounds bounds){
    super(canvas, root, bounds);
    drag = new MouseRotate(MouseRotate.MANUAL_WAKEUP);
    drag.setTransformGroup(currGrp);
    currGrp.addChild(drag);
    drag.setSchedulingBounds(bounds);
    this.setSchedulingBounds(bounds);
  }
View Full Code Here

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

   **/

  public PickRotateBehavior(BranchGroup root, Canvas3D canvas, Bounds bounds,
      int pickMode){
    super(canvas, root, bounds);
    drag = new MouseRotate(MouseRotate.MANUAL_WAKEUP);
    drag.setTransformGroup(currGrp);
    currGrp.addChild(drag);
    drag.setSchedulingBounds(bounds);
    this.setSchedulingBounds(bounds);
    this.setMode(pickMode);
View Full Code Here

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

/*     */   private TransformGroup currentTG;
/*     */
/*     */   public PickRotateBehavior(BranchGroup root, Canvas3D canvas, Bounds bounds)
/*     */   {
/*  85 */     super(canvas, root, bounds);
/*  86 */     this.drag = new MouseRotate(1);
/*  87 */     this.drag.setTransformGroup(this.currGrp);
/*  88 */     this.currGrp.addChild(this.drag);
/*  89 */     this.drag.setSchedulingBounds(bounds);
/*  90 */     setSchedulingBounds(bounds);
/*     */   }
View Full Code Here

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

/*     */   }
/*     */
/*     */   public PickRotateBehavior(BranchGroup root, Canvas3D canvas, Bounds bounds, int pickMode)
/*     */   {
/* 106 */     super(canvas, root, bounds);
/* 107 */     this.drag = new MouseRotate(1);
/* 108 */     this.drag.setTransformGroup(this.currGrp);
/* 109 */     this.currGrp.addChild(this.drag);
/* 110 */     this.drag.setSchedulingBounds(bounds);
/* 111 */     setSchedulingBounds(bounds);
/* 112 */     setMode(pickMode);
View Full Code Here

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

/*     */   private TransformGroup currentTG;
/*     */
/*     */   public PickRotateBehavior(BranchGroup root, Canvas3D canvas, Bounds bounds)
/*     */   {
/*  90 */     super(canvas, root, bounds);
/*  91 */     this.drag = new MouseRotate(1);
/*  92 */     this.drag.setTransformGroup(this.currGrp);
/*  93 */     this.currGrp.addChild(this.drag);
/*  94 */     this.drag.setSchedulingBounds(bounds);
/*  95 */     setSchedulingBounds(bounds);
/*     */   }
View Full Code Here

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

/*     */   }
/*     */
/*     */   public PickRotateBehavior(BranchGroup root, Canvas3D canvas, Bounds bounds, int pickMode)
/*     */   {
/* 111 */     super(canvas, root, bounds);
/* 112 */     this.drag = new MouseRotate(1);
/* 113 */     this.drag.setTransformGroup(this.currGrp);
/* 114 */     this.currGrp.addChild(this.drag);
/* 115 */     this.drag.setSchedulingBounds(bounds);
/* 116 */     setSchedulingBounds(bounds);
/* 117 */     this.pickMode = pickMode;
View Full Code Here

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

      objTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
      objTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
      objRot.addChild(objTrans);

      // Create the rotate behavior node
      MouseRotate behavior = new MouseRotate(objTrans);
      objTrans.addChild(behavior);
      behavior.setSchedulingBounds(bounds);
     
      // Create the zoom behavior node
      MouseZoom behavior2 = new MouseZoom(objTrans);
      objTrans.addChild(behavior2);
      behavior2.setSchedulingBounds(bounds);
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.