本文整理汇总了Java中gov.nasa.worldwind.terrain.ZeroElevationModel类的典型用法代码示例。如果您正苦于以下问题:Java ZeroElevationModel类的具体用法?Java ZeroElevationModel怎么用?Java ZeroElevationModel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ZeroElevationModel类属于gov.nasa.worldwind.terrain包,在下文中一共展示了ZeroElevationModel类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setVerticalExaggeration
import gov.nasa.worldwind.terrain.ZeroElevationModel; //导入依赖的package包/类
private void setVerticalExaggeration(int exaggeration) {
this.exaggeration=exaggeration;
if(this.exaggeration==0){
wwd.getModel().getGlobe().setElevationModel(new ZeroElevationModel());
}else{
File xml = new File(getExternalCacheDir()+"/"+Constants.URLWORLD+Constants.ELEVATION_NAME+"/",Constants.ELEVATION_NAME+".xml");
if(xml.exists()){
if(wwd.getModel().getGlobe().getElevationModel() instanceof ZeroElevationModel){
ElevationModel em = WorldWindUtils.getElevationModel(xml);
em.setNetworkRetrievalEnabled(false);
wwd.getModel().getGlobe().setElevationModel(em);
}else{
wwd.getSceneController().setVerticalExaggeration(this.exaggeration);
}
}else{
wwd.getModel().getGlobe().setElevationModel(new ZeroElevationModel());
}
}
}
示例2: addElevationLayer
import gov.nasa.worldwind.terrain.ZeroElevationModel; //导入依赖的package包/类
private void addElevationLayer() {
if(exaggeration==0){
wwd.getModel().getGlobe().setElevationModel(new ZeroElevationModel());
}else{
File xml = new File(getExternalCacheDir()+"/"+Constants.URLWORLD+Constants.ELEVATION_NAME+"/",Constants.ELEVATION_NAME+".xml");
if(xml.exists()){
ElevationModel em = WorldWindUtils.getElevationModel(xml);
em.setNetworkRetrievalEnabled(false);
wwd.getModel().getGlobe().setElevationModel(em);
wwd.getSceneController().setVerticalExaggeration(this.exaggeration);
}else{
wwd.getModel().getGlobe().setElevationModel(new ZeroElevationModel());
}
}
}
示例3: setFlatGlobe
import gov.nasa.worldwind.terrain.ZeroElevationModel; //导入依赖的package包/类
/**
* Set the globe as flat.
*
* @param doMercator
* if <code>true</code>, mercator is used as opposed to lat/long.
*/
public void setFlatGlobe( boolean doMercator ) {
EarthFlat globe = new EarthFlat();
globe.setElevationModel(new ZeroElevationModel());
wwd.getModel().setGlobe(globe);
wwd.getView().stopMovement();
GeographicProjection projection;
if (doMercator) {
projection = new ProjectionMercator();
} else {
projection = new ProjectionEquirectangular();
}
globe.setProjection(projection);
wwd.redraw();
}
示例4: setFlatSphereGlobe
import gov.nasa.worldwind.terrain.ZeroElevationModel; //导入依赖的package包/类
/**
* Set the globe as flat sphere.
*/
public void setFlatSphereGlobe() {
Earth globe = new Earth();
globe.setElevationModel(new ZeroElevationModel());
wwd.getModel().setGlobe(globe);
wwd.getView().stopMovement();
wwd.redraw();
}