Package com.jmex.terrain.util

Examples of com.jmex.terrain.util.ImageBasedHeightMap


  private Texture _skyboxTexture[];

  public Map(File heightMapFile, File materialMapFile, Vector3f scaleFactor,
      File groundTexture, File groundDetailTexture, File skyboxDir)
      throws FileNotFoundException, IOException {
    _heightMap = new  ImageBasedHeightMap(ImageIO.read(heightMapFile));

    _materialMap = new MaterialMap(ImageIO.read(materialMapFile), 32);

    _terrain = new MaterialTerrainPage(RootTerrainPage, _heightMap
        .getSize() / 8, _heightMap.getSize(), scaleFactor, _heightMap
View Full Code Here


      File[] files = new File[3];
      files[0] = new File( "/Users/scanfield/Desktop/map/tile3.png" );
      files[1] = new File( "/Users/scanfield/Desktop/map/tile4.png" );
      files[2] = new File( "/Users/scanfield/Desktop/map/tile1.png" );
      File heightMapFile = new File( "/Users/scanfield/Desktop/map/heightmap.png" );
      TileMap tileMap = new TileMap( new File( "/Users/scanfield/Desktop/map/tilemap.png" ), new ImageBasedHeightMap( ImageIO.read( heightMapFile )), files );
     
      System.out.println( TileTexture.TILE_WIDTH + "x" + TileTexture.TILE_HEIGHT );
     
      Node[][] nodes = new Node[10][10];
      for( int n = 0; n < 10; n++ ) {
View Full Code Here

        this.heightMaps = new ImageBasedHeightMap[TERRAIN_PAGES];
    
        Vector3f stepScale = new Vector3f(scale.x, scale.y, scale.x);
        Vector3f origin = new Vector3f(0, 0, 0);

        for (int loop=0;loop<TERRAIN_PAGES;loop++) heightMaps[loop] = new ImageBasedHeightMap(new ImageIcon(TerrainContinuous.class.getClassLoader().
            getResource("data/wor_blank.jpg")).getImage());

        heightMaps[4] = new ImageBasedHeightMap(new ImageIcon(TerrainContinuous.class.getClassLoader().
            getResource("data/wor1.jpg")).getImage());
        heightMaps[5] = new ImageBasedHeightMap(new ImageIcon(TerrainContinuous.class.getClassLoader().
            getResource("data/wor2.jpg")).getImage());
        heightMaps[6] = new ImageBasedHeightMap(new ImageIcon(TerrainContinuous.class.getClassLoader().
            getResource("data/wor3.jpg")).getImage());
        heightMaps[7] = new ImageBasedHeightMap(new ImageIcon(TerrainContinuous.class.getClassLoader().
            getResource("data/wor4.jpg")).getImage());
        heightMaps[8] = new ImageBasedHeightMap(new ImageIcon(TerrainContinuous.class.getClassLoader().
            getResource("data/wor5.jpg")).getImage());
        heightMaps[9] = new ImageBasedHeightMap(new ImageIcon(TerrainContinuous.class.getClassLoader().
            getResource("data/wor6.jpg")).getImage());
        heightMaps[10] = new ImageBasedHeightMap(new ImageIcon(TerrainContinuous.class.getClassLoader().
            getResource("data/wor7.jpg")).getImage());
        heightMaps[11] = new ImageBasedHeightMap(new ImageIcon(TerrainContinuous.class.getClassLoader().
            getResource("data/wor8.jpg")).getImage());
      
        buildTerrain(name, heightMaps[0].getSize(), stepScale, origin, clod);
        //displacePages(this.pageSize);
      
View Full Code Here

TOP

Related Classes of com.jmex.terrain.util.ImageBasedHeightMap

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.