Package com.jme.scene.state

Examples of com.jme.scene.state.LightState


    light.setAmbient(new ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f));
    light.setDirection(new Vector3f(1, -1, 0).normalize());
    light.setEnabled(true);

    // Attach the light to a lightState and the lightState to root.
    LightState lightState = display.getRenderer().createLightState();
    lightState.setEnabled(true);
    lightState.attach(light);
    root.setRenderState(lightState);
  }
View Full Code Here


        } else {
            GraphicsUtils.printRenderState(ms);
        }

        System.err.println("Light State =");
        LightState ls = (LightState) spatial.getRenderState(RenderState.RS_LIGHT);
        if (ls == null) {
            System.err.println("null");
        } else {
            GraphicsUtils.printRenderState(ls);
        }
View Full Code Here

        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);
    /*
    System.err.println(">>>>>>>>>>>>>> Initializing light state for component" + name);
    System.err.println("--------------------------------------------");
    GraphicsUtils.printCommonRenderStates(quad);
View Full Code Here

        light.setDirection(new Vector3f(1,-1,0));
        light.setShadowCaster(true);
        light.setEnabled(true);

          /** Attach the light to a lightState and the lightState to rootNode. */
        LightState lightState = display.getRenderer().createLightState();
        lightState.setEnabled(true);
        lightState.setGlobalAmbient(new ColorRGBA(.2f, .2f, .2f, 1f));
        lightState.attach(light);
        rootNode.setRenderState(lightState);
    }
View Full Code Here

    // know... too tired to try.
    Node missleTrajectory2 = new Node("missleTrajectory");
      missleTrajectory2.attachChild(box);
     
      // Don't know what this is doing really.... see comments below
        LightState ls = display.getRenderer().createLightState();
        ls.setEnabled(false);
        missleTrajectory2.setRenderState(ls);
        missleTrajectory2.updateRenderState();
       
        //  Add the controller class to the box. Notice, I am passing the
        //  missleTrajectory2 node to the BulletMover class.  This is so the
View Full Code Here

        light.setDirection(new Vector3f(1,-1,0));
        light.setShadowCaster(true);
        light.setEnabled(true);

          /** Attach the light to a lightState and the lightState to getRootNode(). */
        LightState lightState = getRenderer().createLightState();
        lightState.setEnabled(true);
        lightState.setGlobalAmbient(new ColorRGBA(.2f, .2f, .2f, 1f));
        lightState.attach(light);
        getRootNode().setRenderState(lightState);
    }
View Full Code Here

    // know... too tired to try.
    Node missleTrajectory2 = new Node("missleTrajectory");
      missleTrajectory2.attachChild(box);
     
      // Don't know what this is doing really.... see comments below
        LightState ls = getRenderer().createLightState();
        ls.setEnabled(false);
        missleTrajectory2.setRenderState(ls);
        missleTrajectory2.updateRenderState();
       
        //  Add the controller class to the box. Notice, I am passing the
        //  missleTrajectory2 node to the BulletMover class.  This is so the
View Full Code Here

TOP

Related Classes of com.jme.scene.state.LightState

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.