Package com.jme3.light

Examples of com.jme3.light.DirectionalLight


    // ship.scale(0.1f);
    // ship.setLocalTranslation(0.3f, 0.1f, 0f);
    rootNode.attachChild(ship);

    // Light
    DirectionalLight sun = new DirectionalLight();
    sun.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f));
    rootNode.addLight(sun);
  }
View Full Code Here


    // 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());
    rootNode.addLight(dl);
  }
View Full Code Here

       }
     });
     
      man.loadParts("megaset.csv");
        DirectionalLight sun = new DirectionalLight();
        sun.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f).normalizeLocal());
        rootNode.addLight(sun);
       
        //move cam a bit closer
        cam.setLocation(cam.getLocation().mult(0.5f));
View Full Code Here

    public Viewer() {
        super();
        this.cameraLight = new PointLight();
        this.cameraLight.setColor(ColorRGBA.White);
        this.cameraLight.setRadius(10f);
        this.sunLight = new DirectionalLight();
        this.sunLight.setColor(ColorRGBA.White);
        this.sunLight.setDirection(new Vector3f(-1, -1, -1).normalizeLocal());
    }
View Full Code Here

  }

  public static void setupGameEnvironment(Node rootNode, PhysicsSpace physicsSpace, AssetManager assetManager) {

    // Must add a light to make the lit objects visible
    DirectionalLight sun = new DirectionalLight();
    sun.setDirection(new Vector3f(1, -5, -2).normalizeLocal());
    sun.setColor(ColorRGBA.White);
    rootNode.addLight(sun);

    // Platform
    Material material = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    material.setTexture("ColorMap", assetManager.loadTexture("Textures/concrete_cracked.jpeg"));
View Full Code Here

      
    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());
    rootNode.addLight(dl);
        //Todo
    }
View Full Code Here

       
        flyCam.setDragToRotate(true);

        rootNode.attachChild(machine.getNode());

        DirectionalLight sun = new DirectionalLight();
        sun.setDirection((new Vector3f(-0.5f, -0.5f, -0.5f)).normalizeLocal());
        sun.setColor(ColorRGBA.White.mult(2f));
        rootNode.addLight(sun);

        cam.setViewPort(0.5f, 1f, 0f, 0.5f);
        cam.setLocation(new Vector3f(-1.3480331f * 1000, 1.098075f * 1000, 1.3006098f * 1000));
        cam.setRotation(new Quaternion(0.107952856f, 0.8841834f, -0.25264242f, 0.37780634f));
View Full Code Here

            sm.attach(mouse);
            debugNode.attachChild(mouse.getPointer());
        }

        directionalLight = new DirectionalLight();
        directionalLight.setName("Debug light");
        directionalLight.setColor(ColorRGBA.White);
        directionalLight.setDirection(new Vector3f(.5f, -1f, -.1f).normalizeLocal());
        simpleApp.getRootNode().addLight(directionalLight);
View Full Code Here

    rootNode.attachChild(xAxis);
    rootNode.attachChild(yAxis);
    rootNode.attachChild(zAxis);

    // Create the light source.
    light = new DirectionalLight();
    rootNode.addLight(light);

    // Load the hector model.
    // hector = new Hector("test", assetManager, new Vector3f(0.0f, 0.0f, 0.0f), 0,
    // ColorRGBA.Yellow, ColorRGBA.Yellow, ColorRGBA.Blue);
View Full Code Here

    this.elevation = elevation;
    this.radius = radius;
    this.visible = visible;

    if (intensity > 0) {
      light = new DirectionalLight();
      light.setColor(color.mult(intensity));
      light.setDirection(World.toCartesian(azimuth, elevation, 1).negate());
    }
  }
View Full Code Here

TOP

Related Classes of com.jme3.light.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.