Package javax.media.j3d

Examples of javax.media.j3d.DirectionalLight


/* 64 */     super.readObject(in);
/* 65 */     ((DirectionalLight)this.node).setDirection(this.control.readVector3f(in));
/*    */   }
/*    */
/*    */   protected SceneGraphObject createNode() {
/* 69 */     return new DirectionalLight();
/*    */   }
View Full Code Here


      Color3f lColor2 = new Color3f(0.7f, 0.7f, 0.0f);
      Vector3f lDir1  = new Vector3f(-1.0f, -1.0f, 1.0f);
      Vector3f lDir2  = new Vector3f(0.0f, 0.0f, -1.0f);
     
      AmbientLight     lgt0 = new AmbientLight(true, lColor2);
      DirectionalLight lgt1 = new DirectionalLight(lColor1, lDir1);
      DirectionalLight lgt2 = new DirectionalLight(lColor2, lDir2);
      lgt0.setInfluencingBounds(bounds);
      lgt1.setInfluencingBounds(bounds);
      lgt2.setInfluencingBounds(bounds);
      objScale.addChild(lgt0);
      objScale.addChild(lgt1);
      objScale.addChild(lgt2);

  }
View Full Code Here

    AmbientLight ambientLightNode = new AmbientLight(ambientColor);
    ambientLightNode.setInfluencingBounds(bounds);
    objScale.addChild(ambientLightNode);

    DirectionalLight light1
        = new DirectionalLight(light1Color, light1Direction);
    light1.setInfluencingBounds(bounds);
    objScale.addChild(light1);

    DirectionalLight light2
        = new DirectionalLight(light2Color, light2Direction);
    light2.setInfluencingBounds(bounds);
    objScale.addChild(light2);

  }
View Full Code Here

        super();
        this.sun = sun;
        sun.addObserver(this);
        computeRiseAngleData();
        computeZenithAngleData();
        light = new DirectionalLight(computeColor(), computeDirection());
        light.setInfluencingBounds(bounds);
        light.setCapability(Light.ALLOW_COLOR_WRITE);
        light.setCapability(DirectionalLight.ALLOW_DIRECTION_WRITE);
    }
View Full Code Here

TOP

Related Classes of javax.media.j3d.DirectionalLight

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.