Package com.jme.light

Examples of com.jme.light.PointLight


      Level myLevel = new Level(levelFile);
      rootNode.attachChild(tp = (MaterialTerrainPage) myLevel.getMap().getTerrain());

      Vector3f loc = new Vector3f(0.0f, 300.0f, 0.0f);
      PointLight pl = new PointLight();
      pl.setLocation(loc);
      pl.setEnabled(true);
      lightState.attach(pl);
      wireState.setEnabled(false);
    } catch (FileNotFoundException ex) {
      ex.printStackTrace();
    } catch (IOException ex) {
View Full Code Here


        // detach all possible lights, we will setup our own
        lightState.detachAll();
        // our light
        final PointLight light = new PointLight();
        light.setDiffuse(ColorRGBA.white);
        light.setSpecular(ColorRGBA.white);
        light.setLocation(new Vector3f(100.0f, 100.0f, 100.0f));
        light.setEnabled(true);
        // attach the light to a lightState
        lightState.attach(light);
        // create the sphere object
View Full Code Here

        ZBufferState buf = display.getRenderer().createZBufferState();
        buf.setEnabled(true);
        buf.setFunction(ZBufferState.TestFunction.LessThanOrEqualTo);
        rootNode.setRenderState(buf);

        PointLight light = new PointLight();
        light.setDiffuse(new ColorRGBA(0.75f, 0.75f, 1.0f, 0.75f));
        light.setAmbient(new ColorRGBA(0.1f, 0.1f, 0.1f, 1.0f));
        light.setLocation(new Vector3f(40, 40, 40));
        light.setEnabled(true);

        PointLight light2 = new PointLight();
        light2.setDiffuse(new ColorRGBA(1.0f, 0.0f, 0.0f, 0.0f));
        light2.setAmbient(new ColorRGBA(0.0f, 0.0f, 0.0f, 1.0f));
        light2.setLocation(new Vector3f(-140, -140, -140));
        light2.setEnabled(true);
        light2.setShadowCaster(true);
        lightState = display.getRenderer().createLightState();
        lightState.setEnabled(true);
        lightState.attach(light);
        lightState.attach(light2);
View Full Code Here

    // TODO: someday: temporary: until sync up with global light change
    /**
     * Initialize the light state.
     */
    protected void initLightState() {
        PointLight light = new PointLight();
        light.setDiffuse(new ColorRGBA(0.75f, 0.75f, 0.75f, 0.75f));
        light.setAmbient(new ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f));
        light.setLocation(new Vector3f(100, 100, 100));
        light.setEnabled(true);
        LightState lightState = (LightState) ClientContextJME.getWorldManager().getRenderManager().createRendererState(RenderState.RS_LIGHT);
        lightState.setEnabled(true);
        lightState.attach(light);
        quad.setRenderState(lightState);
    /*
 
View Full Code Here

    /**
     * Initialize the light state.
     */
    protected void initLightState() {
        PointLight light = new PointLight();
        light.setDiffuse(new ColorRGBA(0.75f, 0.75f, 0.75f, 0.75f));
        light.setAmbient(new ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f));
        light.setLocation(new Vector3f(100, 100, 100));
        light.setEnabled(true);
        lightState = (LightState) ClientContextJME.getWorldManager().getRenderManager().createRendererState(RenderState.RS_LIGHT);
        lightState.setEnabled(true);
        lightState.attach(light);
    }
View Full Code Here

TOP

Related Classes of com.jme.light.PointLight

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.