Examples of PointLight


Examples of com.badlogic.gdx.graphics.g3d.environment.PointLight

    this.directionalLights = new DirectionalLight[lighting && config.numDirectionalLights > 0 ? config.numDirectionalLights : 0];
    for (int i = 0; i < directionalLights.length; i++)
      directionalLights[i] = new DirectionalLight();
    this.pointLights = new PointLight[lighting && config.numPointLights > 0 ? config.numPointLights : 0];
    for (int i = 0; i < pointLights.length; i++)
      pointLights[i] = new PointLight();

    if (!ignoreUnimplemented && (implementedFlags & materialMask) != materialMask)
      throw new GdxRuntimeException("Some attributes not implemented yet ("+materialMask+")");
   
    // Global uniforms
View Full Code Here

Examples of com.badlogic.gdx.graphics.g3d.environment.PointLight

    this.directionalLights = new DirectionalLight[lighting && config.numDirectionalLights > 0 ? config.numDirectionalLights : 0];
    for (int i = 0; i < directionalLights.length; i++)
      directionalLights[i] = new DirectionalLight();
    this.pointLights = new PointLight[lighting && config.numPointLights > 0 ? config.numPointLights : 0];
    for (int i = 0; i < pointLights.length; i++)
      pointLights[i] = new PointLight();

    if (!config.ignoreUnimplemented && (implementedFlags & materialMask) != materialMask)
      throw new GdxRuntimeException("Some attributes not implemented yet (" + materialMask + ")");

    // Global uniforms
View Full Code Here

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

Examples of com.jme.light.PointLight

        // 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

Examples of com.jme.light.PointLight

        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

Examples of com.jme.light.PointLight

    // 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

Examples of com.jme.light.PointLight

    /**
     * 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

Examples of com.jme3.light.PointLight

      }
    });
  }
 
  private PointLight getPointLight() {
    PointLight ll = new PointLight();
    ll.setColor(new ColorRGBA(1.0f, 0.92f, 0.75f, 1f));
    ll.setRadius(20f);
    return ll;
  }
View Full Code Here

Examples of com.jme3.light.PointLight

        lightMdl = new Geometry("Light", new Sphere(10, 10, 0.1f));
        lightMdl.setMaterial(assetManager.loadMaterial("Common/Materials/RedColor.j3m"));
        lightMdl.getMesh().setStatic();
        rootNode.attachChild(lightMdl);

        pl = new PointLight();
        pl.setColor(ColorRGBA.White);
        //pl.setRadius(3f);
        rootNode.addLight(pl);
    }
View Full Code Here

Examples of com.jme3.light.PointLight

    //marker = new QuadMarker(size);
    this.attachChild((Spatial)marker);
  }
 
  public PointLight getLight() {
    light = new PointLight();
    light.setColor(ColorRGBA.White);
    light.setRadius(400000f);
    light.setPosition(this.getLocalTranslation());
    return light;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.