Package com.jme3.terrain.heightmap

Examples of com.jme3.terrain.heightmap.ImageBasedHeightMap.load()


        for (Iterator<ModelKey> it = assetLoaderKeys.iterator(); it.hasNext();) {
            ModelKey modelKey = it.next();
            AssetInfo info = loaderManager.locateAsset(modelKey);
            Spatial child = null;
            if (info != null) {
                child = (Spatial) importer.load(info);
            }
            if (child != null) {
                child.parent = this;
                children.add(child);
                assetChildren.put(modelKey, child);
View Full Code Here


            is = new GZIPInputStream(new BufferedInputStream(new FileInputStream(file)));
            BinaryImporter imp = BinaryImporter.getInstance();
            if (manager != null) {
                imp.setAssetManager(manager);
            }
            sav = imp.load(is);
            Logger.getLogger(SaveGame.class.getName()).log(Level.FINE, "Loading data from: {0}", file.getAbsolutePath());
        } catch (IOException ex) {
            Logger.getLogger(SaveGame.class.getName()).log(Level.SEVERE, "Error loading data: {0}", ex);
            ex.printStackTrace();
        } finally {
View Full Code Here

        if (id != null) {
            Pointer pProperties = (Pointer) id.getFieldValue("properties");
            if (pProperties.isNotNull()) {
                Structure propertiesStructure = pProperties.fetchData().get(0);
                properties = new Properties();
                properties.load(propertiesStructure, blenderContext);
            }
        }
        return properties;
    }
View Full Code Here

    for (File name : file.listFiles(skeletonFilter)) {
      //new loader each time, yes
//      SkeletonLoader loader;
      try {
        SkeletonLoader loader = new SkeletonLoader();
        AnimData ad = (AnimData)loader.load(name.toURI().toURL().openStream());
        if(ad != null && ad.skeleton != null){
          String fName = name.getName().substring(0,name.getName().length()-".xml".length());
         
          BinaryExporter.getInstance().save(ad.skeleton,
              new File(path + File.separatorChar + fName+ ".j3o"));
View Full Code Here

        // load app cfg
        if (appCfg != null){
            InputStream in = null;
            try {
                in = appCfg.openStream();
                settings.load(in);
                in.close();
            } catch (IOException ex){
                // Called before application has been created ....
                // Display error message through AWT
                JOptionPane.showMessageDialog(this, "An error has occured while "
View Full Code Here

       
        minWidth = source.getMinWidth();
        minHeight = source.getMinHeight();
       
        try {
            registrySettings.load(appTitle);
        } catch (BackingStoreException ex) {
            logger.log(Level.WARNING,
                    "Failed to load settings", ex);
        }
View Full Code Here

        AbstractHeightMap heightmap = null;
        try {
            //heightmap = new HillHeightMap(1025, 1000, 50, 100, (byte) 3);

            heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 1f);
            heightmap.load();

        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here

          AbstractHeightMap heightmap = null;
          try {
              //heightmap = new HillHeightMap(1025, 1000, 50, 100, (byte) 3);
            Texture heightMapImage = assetManager.loadTexture("Textures/Terrain/splat/mountains512.png");
              heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 1f);
              heightmap.load();

          } catch (Exception e) {
              e.printStackTrace();
          }
View Full Code Here

        AbstractHeightMap heightmap = null;
        try {
            //heightmap = new HillHeightMap(1025, 1000, 50, 100, (byte) 3);

            heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), .5f);
            heightmap.load();

        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here

        float[] arr = buffer.array();
        for (int i = 0; i < arr.length; i++) {
            arr[i] = arr[i] * this.heightScale;
        }
        heightmap = new FloatBufferHeightMap(buffer);
        heightmap.load();
        return heightmap;
    }

    public TerrainQuad getTerrainQuadAt(Vector3f location) {
        HeightMap heightMapAt = getHeightMapAt(location);
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.