Package org.earth3d.jearth.draw.tree

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


  private Draw buildTreeDrawSphere(Geometry geometry) {
    MapTileTree mtt = new MapTileTree();
    mtt.addMapTreeChangeListener(this);
   
    MapTileTreeNode rootNode = mtt.getRootNode();
   
    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);

    } catch (MalformedURLException e2) {
      // TODO Auto-generated catch block
      e2.printStackTrace();
    }
View Full Code Here

TOP

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

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.