Package com.jme3.light

Examples of com.jme3.light.AmbientLight


        DirectionalLight light = new DirectionalLight();
        light.setDirection((new Vector3f(-0.5f, -1f, -0.5f)).normalize());
        rootNode.addLight(light);

        AmbientLight ambLight = new AmbientLight();
        ambLight.setColor(new ColorRGBA(0.2f, 0.2f, 0.2f, 1f));
        rootNode.addLight(ambLight);
     

     
      rootNode.attachChild(scene);
View Full Code Here


    visible = pcHandler.createPCComponents(data, new NewCharacterModel(pcHandler.getSelectedSummary()));
    logger.fine("Character initialized to:" + visible.getLocalTranslation());

    setupChaseCamera(visible, cam);
   
        AmbientLight al = new AmbientLight();
        al.setColor(new ColorRGBA(.8f, .8f, .8f, 1.0f));
    Singleton.get().getSceneManager().changeRootLight(al,Action.ADD);

    pl = new PointLight();
    pl.setColor(ColorRGBA.White);
    pl.setRadius(15f);
View Full Code Here

      geom2.setMaterial(mat2);
      geom2.setQueueBucket(Bucket.Transparent);
      geom2.setLocalTranslation(-39f, -15f, -90f)
      Singleton.get().getSceneManager().changeTerrainNode(geom2,Action.ADD);
     
    AmbientLight al = new AmbientLight();
      al.setColor(new ColorRGBA(.8f, .8f, .8f, 1.0f));
    Singleton.get().getSceneManager().changeRootLight(al,Action.ADD);
    //#############################################################

    SwingUtilities.invokeLater(new Runnable() {
View Full Code Here

  }

  private void setUpLight() {

    // We add light so we see the scene
    AmbientLight al = new AmbientLight();
    al.setColor(ColorRGBA.White.mult(1.3f));
    rootNode.addLight(al);

    DirectionalLight dl = new DirectionalLight();
    dl.setColor(ColorRGBA.White);
    dl.setDirection(new Vector3f(2.8f, -2.8f, -2.8f).normalizeLocal());
View Full Code Here

            ((DirectionalLight) light).setDirection(Vector3f.UNIT_Z);
        } else if (lightType.equals("spotLight") || lightType.equals("spot")) {
            light = new SpotLight();
        } else if (lightType.equals("omni")) {
            // XXX: It doesn't seem any exporters actually emit this type?
            light = new AmbientLight();
        } else {
            logger.log(Level.WARNING, "No matching jME3 LightType found for OGRE LightType: {0}", lightType);
        }
        logger.log(Level.FINEST, "{0} created.", light);
View Full Code Here

        } else if (qName.equals("colourAmbient") || qName.equals("colorAmbient")) {
            if (elementStack.peek().equals("environment")) {
                ColorRGBA color = parseColor(attribs);
                if (!color.equals(ColorRGBA.Black) && !color.equals(ColorRGBA.BlackNoAlpha)) {
                    // Lets add an ambient light to the scene.
                    AmbientLight al = new AmbientLight();
                    al.setColor(color);
                    root.addLight(al);
                }
            }
        } else if (qName.equals("normal") || qName.equals("direction")) {
            checkTopNode("light");
View Full Code Here

     *            the world's blender structure
     * @return the scene's ambient light
     */
    public Light toAmbientLight(Structure worldStructure) {
        LOGGER.fine("Loading ambient light.");
        AmbientLight ambientLight = null;
        float ambr = ((Number) worldStructure.getFieldValue("ambr")).floatValue();
        float ambg = ((Number) worldStructure.getFieldValue("ambg")).floatValue();
        float ambb = ((Number) worldStructure.getFieldValue("ambb")).floatValue();
        if (ambr > 0 || ambg > 0 || ambb > 0) {
            ambientLight = new AmbientLight();
            ColorRGBA ambientLightColor = new ColorRGBA(ambr, ambg, ambb, 0.0f);
            ambientLight.setColor(ambientLightColor);
            LOGGER.log(Level.FINE, "Loaded ambient light: {0}.", ambientLightColor);
        } else {
            LOGGER.finer("Ambient light is set to BLACK which means: no ambient light! The ambient light node will not be included in the result.");
        }
        return ambientLight;
View Full Code Here

  }

  private void setUpLight() {
    // We add light so we see the scene
    AmbientLight al = new AmbientLight();
    al.setColor(ColorRGBA.White.mult(1.3f));
    rootNode.addLight(al);

    DirectionalLight dl = new DirectionalLight();
    dl.setColor(ColorRGBA.White);
    dl.setDirection(new Vector3f(2.8f, -2.8f, -2.8f).normalizeLocal());
View Full Code Here

    debugGUI = new DebugGUI(this);
  }

  private void setUpLight() {
    // We add light so we see the scene
    AmbientLight al = new AmbientLight();
    al.setColor(ColorRGBA.White.mult(1.3f));
    rootNode.addLight(al);

    DirectionalLight dl = new DirectionalLight();
    dl.setColor(ColorRGBA.White);
    dl.setDirection(new Vector3f(2.8f, -2.8f, -2.8f).normalizeLocal());
View Full Code Here

   * @param assetManager
   * @param space
   */
  public static void createPhysicsTestWorld(Node rootNode, AssetManager assetManager, PhysicsSpace space) {

    AmbientLight light = new AmbientLight();
    light.setColor(ColorRGBA.LightGray);
    rootNode.addLight(light);

    Material material = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    material.setTexture("ColorMap", assetManager.loadTexture("Textures/concrete_cracked.jpg"));

View Full Code Here

TOP

Related Classes of com.jme3.light.AmbientLight

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.