Package com.jme3.scene

Examples of com.jme3.scene.Node.updateGeometricState()


       Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
            mat.setColor("Color", ColorRGBA.randomColor());
      grid.setMaterial(mat);
      TangentBinormalGenerator.fixTileNormals(grid.getMesh(), IArea.TERRAIN_SIZE_HALF, 0.05f);
      TangentBinormalGenerator.generate(grid.getMesh(), false);
      grid.updateGeometricState();
      rootNode.attachChild(grid);
      TiledNavMesh m = (TiledNavMesh) assetManager.loadAsset(file+".jnv");//BinaryImporter.getInstance().load(new File(file+".jnv"));
      em.attachMesh(m);
    } catch (Exception e) {
      // TODO Auto-generated catch block
View Full Code Here


      Geometry grid = (Geometry) assetManager.loadAsset(meshFile);
      grid.setLocalTranslation(x, y, z);
//          Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
//          mat.setColor("Color", ColorRGBA.LightGray);
//      grid.setMaterial(mat);
      grid.updateGeometricState();
      rootNode.attachChild(grid);
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here

    if(g00 == null){
      System.out.println("Asset for "+file+"is missing");
      return null;
    }
    g00.setLocalTranslation(x,y,z);
    g00.updateGeometricState();
    m = new TiledNavMesh();
       
    m.loadFromGeom(g00);
    return m;
    }
View Full Code Here

      Geometry grid = (Geometry) assetManager.loadAsset(meshFile);
      grid.setLocalTranslation(x, y, z);
//          Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
//          mat.setColor("Color", ColorRGBA.LightGray);
//      grid.setMaterial(mat);
      grid.updateGeometricState();
      rootNode.attachChild(grid);
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here

    if(g00 == null){
      System.out.println("Asset for "+file+"is missing");
      return null;
    }
    g00.setLocalTranslation(x,y,z);
    g00.updateGeometricState();
    m = new TiledNavMesh();
       
    m.loadFromGeom(g00);
    return m;
    }
View Full Code Here

    if(g00 == null){
      System.out.println("Asset for "+file+"is missing");
      return;
    }
    g00.setLocalTranslation(transl);
    g00.updateGeometricState();
    m = new TiledNavMesh();
   
    long eT = 0L;
    long sT =  System.currentTimeMillis();         
    m.loadFromGeom(g00);
View Full Code Here

            default:
                frustumMdl.getMaterial().setColor("Color", ColorRGBA.White);
                break;
        }

        frustumMdl.updateGeometricState();
        return frustumMdl;
    }

    public void initialize(RenderManager rm, ViewPort vp) {
        renderManager = rm;
View Full Code Here

            default:
                frustumMdl.getMaterial().setColor("Color", ColorRGBA.White);
                break;
        }

        frustumMdl.updateGeometricState();
        return frustumMdl;
    }

    public void initialize(RenderManager rm, ViewPort vp) {
        renderManager = rm;
View Full Code Here

            Geometry geom = new Geometry("bound", box);
            geom.setLocalTranslation(bbox2.getCenter());
            geom.setLocalScale(bbox2.getXExtent(), bbox2.getYExtent(),
                               bbox2.getZExtent());
            geom.updateGeometricState();
            geom.setMaterial(mat);
            rq.addToQueue(geom, Bucket.Opaque);
            box = null;
            geom = null;
        }
View Full Code Here

            outGeom.setMaterial(inGeom.getMaterial());
            for (Light light : inGeom.getWorldLightList()){
                outGeom.addLight(light);
            }

            outGeom.updateGeometricState();
            newGeoms.add(outGeom);
        }

        return newGeoms;
    }
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.