Package com.jme3.math

Examples of com.jme3.math.ColorRGBA


        .loadModel("scenes/create/create.j3o");
    rootNode.attachChild(n);

    for(Light l :n.getLocalLightList())
      if(l instanceof AmbientLight)
        l.setColor(new ColorRGBA(0.5f,0.5f,0.5f,1.0f));
   
    PartSetManager man = PartSetManager.get();
    man.loadParts("dwarf.csv");
    Spatial n2 = Assembler2.getModel3("DwarfWarriorM");
//    n.setLocalTranslation(.126f,-.1224f, 5.76f);
View Full Code Here


        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

        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

    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

   
    TiledNavMesh mesh = NavigationManager.get().getNavMesh(list.get(0).mesh);
    NavTestHelper.debugShowBox(assetMan, root,list.get(0).position, ColorRGBA.Green, width, .8f, width);
    NavTestHelper.debugShowCell(assetMan, root, mesh.getCell(list.get(0).cell), ColorRGBA.Blue, true);
    for(int i = 1; i< list.size()-1;i++){
      ColorRGBA color = ColorRGBA.White.mult(((float)i/list.size()));
      NavTestHelper.debugShowBox(assetMan, root, list.get(i).position, color, width, .8f, width);
      debugShowLine(assetMan, root, list.get(i-1).position, list.get(i).position, color);
        }
    for(int i=1; i<list.size()-1;i++){
      mesh = NavigationManager.get().getNavMesh(list.get(i).mesh);
View Full Code Here

      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

    if(sky == null)
      sky = SkyFactory.createSky(Singleton.get().getAssetManager().getJmeAssetMan(),"models/textures/sky_povray1.jpg", true);
        Singleton.get().getSceneManager().changeCharNode(sky,Action.ADD);
       
        skyLight = new DirectionalLight();
        skyLight.setColor(new ColorRGBA(0.8f, 0.75f, 0.8f, 1f));
    Singleton.get().getSceneManager().changeRootLight(skyLight, Action.ADD);
   
//    //TODO should be not here
//        DirectionalLightShadowFilter dlsf = new DirectionalLightShadowFilter(assetManager, 2048, 3);
//        dlsf.setLight(dl);
View Full Code Here

  public void addSkyDome(Camera cam, int timeOffset){
    if(sky == null)
      sky = new Node("Sky");
   
    skyLight = new DirectionalLight();
    skyLight.setColor(new ColorRGBA(1f, 1f, 1f, 1f));
    Singleton.get().getSceneManager().changeRootLight(skyLight, Action.ADD);
   
    AssetManager assetManager = Singleton.get().getAssetManager().getJmeAssetMan();
    com.l2client.util.SkyDome skyControl = new com.l2client.util.SkyDome(assetManager, cam);
    skyControl.setUseCalendar(false);
    skyControl.setSun(skyLight);
    skyControl.setControlSun(true);
    skyControl.setTimeOffset(timeOffset);
    skyControl.setDaySkyColor(new ColorRGBA(0.75f, 0.75f, 1f, 1f));
    skyControl.setSkyNightColor(new ColorRGBA(0.2f, 0.15f, 0.25f, 1f));
    skyControl.setSunDayLight(new ColorRGBA(0.7f, 0.7f, 0.7f, 1f));
    skyControl.setSunNightLight(new ColorRGBA(0.05f, 0.05f, 0.1f, 1f));
    skyControl.initializeCalendar(1, 1, 24, 7, 4, 24);
    sky.addControl(skyControl);
    sky.setQueueBucket(Bucket.Sky);
    Singleton.get().getSceneManager().changeCharNode(sky,Action.ADD);
    //TODO should be not here
View Full Code Here

    if(selection == null)
      selection = createSelectionMarker();
     
      Singleton.get().getSceneManager().changeAnyNode(this, selection, Action.ADD);
      if(vis != null) {
        ColorRGBA cl;
        if(color != null)
        cl = color.clone();
        else
          cl = ColorRGBA.White.clone();
        //use an intensity of 12 for the rimlight
View Full Code Here

   * @param c2  The color to blend
   * @param amount  The amount of c2 to blend into c1
   * @return r  The resulting ColorRGBA
     */
  private ColorRGBA mix(ColorRGBA c1, ColorRGBA c2, float amount) {
    ColorRGBA r = new ColorRGBA();
    r.interpolate(c1, c2, amount);
    return  r;
  }
View Full Code Here

TOP

Related Classes of com.jme3.math.ColorRGBA

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.