Package org.osm2world.core.map_data.creation

Examples of org.osm2world.core.map_data.creation.MapProjection


        camera = OrthoTilesUtil.cameraForBounds(bounds, angle, from);
        projection = OrthoTilesUtil.projectionForBounds(bounds, angle, from);
       
      } else if (args.isPviewPos()) {
       
        MapProjection proj = results.getMapProjection();
       
        LatLonEle pos = args.getPviewPos();
        LatLonEle lookAt = args.getPviewLookat();
       
        camera = new Camera();
        VectorXYZ posV = proj.calcPos(pos.lat, pos.lon).xyz(pos.ele);
        VectorXYZ laV =  proj.calcPos(lookAt.lat, lookAt.lon).xyz(lookAt.ele);
        camera.setCamera(posV.x, posV.y, posV.z, laV.x, laV.y, laV.z);
       
        projection = new Projection(false,
            args.isPviewAspect() ? args.getPviewAspect() :
              (double)args.getResolution().x / args.getResolution().y,
View Full Code Here


    double lon = Double.parseDouble(
        JOptionPane.showInputDialog(viewerFrame, "lon"));
    double height = Double.parseDouble(
        JOptionPane.showInputDialog(viewerFrame, "height"));
   
    MapProjection projection = data.getConversionResults().getMapProjection();

    VectorXZ newPosXZ = projection.calcPos(lat, lon);
    VectorXYZ newPos = newPosXZ.xyz(height);
   
    renderOptions.camera.move(newPos.subtract(renderOptions.camera.getPos()));
   
  }
View Full Code Here

  }
 
  @Override
  public void actionPerformed(ActionEvent arg0) {
   
    MapProjection mapProjection = data.getConversionResults().getMapProjection();
   
    VectorXYZ pos = renderOptions.camera.getPos();
    VectorXYZ lookAt = renderOptions.camera.getLookAt();
   
    JOptionPane.showMessageDialog(null,
        "posLat = " + mapProjection.calcLat(pos.xz())
        + "\nposLon = " + mapProjection.calcLon(pos.xz())
        + "\nposEle = " + pos.y
        + "\nlookAtLat = " + mapProjection.calcLat(lookAt.xz())
        + "\nlookAtLon = " + mapProjection.calcLon(lookAt.xz())
        + "\nlookAtEle = " + lookAt.y,
        "Current camera configuration", JOptionPane.INFORMATION_MESSAGE);
  }
View Full Code Here

TOP

Related Classes of org.osm2world.core.map_data.creation.MapProjection

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.