Package javax.media.j3d

Examples of javax.media.j3d.Background


      theScene.addChild(tg[i]);
    }


    //Generate a white background.
    Background bg = new Background(new Color3f(1.0f,1.0f,1.0f));
    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0),1000.0);
    bg.setApplicationBounds(bounds);
    theScene.addChild(bg);



    theScene.compile();
View Full Code Here


     @exception IllegalActionException If unable to read the color
     * parameter.
     */
    protected Background _makeBackground() throws IllegalActionException {
        Color3f color = new Color3f(backgroundColor.asColor());
        return new Background(color);
    }
View Full Code Here

         _root.setCapability(BranchGroup.ALLOW_CHILDREN_READ);
         _root.setCapability(BranchGroup.ALLOW_CHILDREN_EXTEND);
         _userTransformation.addChild(_root); */
        _bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0), 100.0);

        Background backg = _makeBackground();
        backg.setApplicationBounds(_bounds);
        _branchRoot.addChild(backg);

        if (_isRotatable()) {
            _mouseRotate = new MouseRotateView(this);
            _mouseRotate.setTransformGroup(_userTransformation);
View Full Code Here

/*     */   }
/*     */
/*     */   void createJava3dObject()
/*     */   {
/* 139 */     if (this.solidBackdrop != 0) {
/* 140 */       this.backgroundObject = new Background(this.color);
/* 141 */       debugOutput(2, "Background color = " + this.color);
/*     */     }
/*     */     else {
/* 144 */       this.backgroundObject = new Background(this.skyColor);
/* 145 */       debugOutput(2, "Background color = " + this.skyColor);
/*     */     }
/* 147 */     BoundingSphere bounds = new BoundingSphere(new Point3d(0.0D, 0.0D, 0.0D), 100000.0D);
/* 148 */     this.backgroundObject.setApplicationBounds(bounds);
/*     */   }
View Full Code Here

/*     */   }
/*     */
/*     */   void addBackground()
/*     */   {
/* 692 */     if (this.background != null) {
/* 693 */       Background bgNode = this.background.getObjectNode();
/* 694 */       if (bgNode != null) {
/* 695 */         this.sceneGroupNode.addChild(bgNode);
/* 696 */         this.scene.addBackgroundNode(bgNode);
/*     */       }
/*     */     }
View Full Code Here

/* 111 */     super.buildGraph();
/*     */   }
/*     */
/*     */   protected SceneGraphObject createNode()
/*     */   {
/* 116 */     return new Background();
/*     */   }
View Full Code Here

       
        BoundingSphere bounds = new BoundingSphere();
        bounds.setRadius(1000d);

       
        Background bg = new Background(new Color3f(Color.white));
        bg.setApplicationBounds(bounds);
        objRoot.addChild(bg);
       
       
       
        // set the ambient light;
View Full Code Here

    shineWithOneColorLights(boundingSphere, objScale);

      // background
      Background background = new Background(0.4f,0.4f,0.8f);
      background.setApplicationBounds(boundingSphere);
      objRoot.addChild(background);
   
      AmbientLight alit = new AmbientLight(true,new Color3f(0.4f,0.4f,0.4f));
      objRoot.addChild(alit);
   
View Full Code Here

TOP

Related Classes of javax.media.j3d.Background

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.