Package org.earth3d.jearth.draw.tree

Examples of org.earth3d.jearth.draw.tree.HeightfieldTree


    GeometryMapTree gmt = (GeometryMapTree) geometry;
    URL source = gmt.getSource();

    MapTileTreeNodeCore newCore;
    String url;
    HeightfieldTree htree = null;
   
    try {
      newCore = new TextureTreeNodeCore(mtt);
      url = ((ConnectionURL) gmt.getTextureConnections().getConnections().get(0)).getUrl();
      newCore.setRequestID(new URL(source, url).toString());
      rootNode.setCore(0, newCore);
    } catch (MalformedURLException e2) {
      e2.printStackTrace();
    }
    try {   
      Geometry2D3D gSphere = Geometry2D3DFactory.getFactory().getGeometry("sphere");

      url = ((ConnectionURL) gmt.getHeightfieldConnections().getConnections().get(0)).getUrl();
     
      /* create HeightfieldTree, it automatically downloads the root node */
      htree = new HeightfieldTree(new URL(source, url).toString(), gSphere, 6378140. / Global.heightfieldmultiplier);
      htree.addHeightfieldTreeChangeListener(this);

      newCore = new HeightfieldTreeNodeCore(gSphere, (float) (6378140. / Global.heightfieldmultiplier), htree);;
      newCore.setRequestID(new URL(source, url).toString());
      rootNode.setCore(1, newCore);

View Full Code Here

TOP

Related Classes of org.earth3d.jearth.draw.tree.HeightfieldTree

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.