gpt4 book ai didi

gov.nasa.worldwind.WorldWindow.setWorldWindowController()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 02:03:05 25 4
gpt4 key购买 nike

本文整理了Java中gov.nasa.worldwind.WorldWindow.setWorldWindowController()方法的一些代码示例,展示了WorldWindow.setWorldWindowController()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorldWindow.setWorldWindowController()方法的具体详情如下:
包路径:gov.nasa.worldwind.WorldWindow
类名称:WorldWindow
方法名:setWorldWindowController

WorldWindow.setWorldWindowController介绍

暂无

代码示例

代码示例来源:origin: NASAWorldWind/WorldWindAndroid

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setAboutBoxTitle("About the " + this.getResources().getText(R.string.title_placemarks_demo));
  setAboutBoxText("Demonstrates LOTS (38K) of Placemarks with various levels of detail.\n\n" +
    "Placemarks are conditionally displayed based on the camera distance: \n" +
      " - symbols are based on population and capitol status,\n" +
      " - zoom in to reveal more placemarks,\n" +
      " - picking is supported, touch a placemark to see the place name.");
  // Add a TextView on top of the globe to convey the status of this activity
  this.statusText = new TextView(this);
  this.statusText.setTextColor(android.graphics.Color.YELLOW);
  FrameLayout globeLayout = (FrameLayout) findViewById(R.id.globe);
  globeLayout.addView(this.statusText);
  // Override the WorldWindow's built-in navigation behavior by adding picking support.
  this.getWorldWindow().setWorldWindowController(new PickController());
  new CreatePlacesTask().execute();
}

代码示例来源:origin: NASAWorldWind/WorldWindAndroid

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setAboutBoxTitle("About the " + this.getResources().getText(R.string.title_paths_and_polygons));
  setAboutBoxText("Demonstrates place names rendered as labels, world highways rendered as paths " +
    "and countries rendered as polygons with random interior colors. \n\n" +
    "The name of the object(s) are displayed when picked.");
  // Add a TextView on top of the globe to convey the status of this activity
  this.statusText = new TextView(this);
  this.statusText.setTextColor(android.graphics.Color.YELLOW);
  FrameLayout globeLayout = (FrameLayout) findViewById(R.id.globe);
  globeLayout.addView(this.statusText);
  // Override the WorldWindow's built-in navigation behavior by adding picking support.
  this.getWorldWindow().setWorldWindowController(new PickController());
  this.getWorldWindow().getLayers().addLayer(this.shapesLayer);
  // Load the shapes into the renderable layer
  statusText.setText("Loading countries....");
  new CreateRenderablesTask().execute();
}

代码示例来源:origin: NASAWorldWind/WorldWindAndroid

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  this.setAboutBoxTitle("About the " + this.getResources().getText(R.string.title_basic_performance_benchmark));
  this.setAboutBoxText("Executes a basic performance benchmark, logging the accumulated frame statistics.");
  // Suppress the WorldWindow's built-in navigation behavior.
  WorldWindow wwd = this.getWorldWindow();
  wwd.setWorldWindowController(new NoOpWorldWindowController());
  // Add a layer containing a large number of placemarks.
  this.getWorldWindow().getLayers().addLayer(this.createPlacemarksLayer());
}

代码示例来源:origin: NASAWorldWind/WorldWindAndroid

/**
 * Creates a new WorldWindow object with a custom WorldWindowController.
 */
@Override
public WorldWindow createWorldWindow() {
  // Let the super class (BasicGlobeFragment) do the creation
  WorldWindow wwd = super.createWorldWindow();
  // Override the default "look at" gesture behavior with a camera centric gesture controller
  wwd.setWorldWindowController(new CameraController());
  // Create a camera position above KOXR airport, Oxnard, CA
  Camera camera = new Camera();
  camera.set(34.2, -119.2,
    10000, WorldWind.ABSOLUTE,
    90, // Looking east
    70, // Lookup up from nadir
    0); // No roll
  // Apply the new camera position
  Globe globe = wwd.getGlobe();
  wwd.getNavigator().setAsCamera(globe, camera);
  return wwd;
}

代码示例来源:origin: NASAWorldWind/WorldWindAndroid

wwd.setWorldWindowController(this.controller);

代码示例来源:origin: NASAWorldWind/WorldWindAndroid

/**
 * Creates a new WorldWindow (GLSurfaceView) object with a WMS Layer
 *
 * @return The WorldWindow object containing the globe.
 */
@Override
public WorldWindow createWorldWindow() {
  // Let the super class (BasicGlobeFragment) do the creation
  WorldWindow wwd = super.createWorldWindow();
  // Override the WorldWindow's built-in navigation behavior by adding picking support.
  wwd.setWorldWindowController(new PickNavigateController());
  // Add a layer for placemarks to the WorldWindow
  RenderableLayer layer = new RenderableLayer("Placemarks");
  wwd.getLayers().addLayer(layer);
  // Create a few placemarks with highlight attributes and add them to the layer
  layer.addRenderable(createAirportPlacemark(Position.fromDegrees(34.2000, -119.2070, 0), "Oxnard Airport"));
  layer.addRenderable(createAirportPlacemark(Position.fromDegrees(34.2138, -119.0944, 0), "Camarillo Airport"));
  layer.addRenderable(createAirportPlacemark(Position.fromDegrees(34.1193, -119.1196, 0), "Pt Mugu Naval Air Station"));
  layer.addRenderable(createAircraftPlacemark(Position.fromDegrees(34.15, -119.15, 2000)));
  // Position the viewer to look near the airports
  LookAt lookAt = new LookAt().set(34.15, -119.15, 0, WorldWind.ABSOLUTE, 2e4 /*range*/, 0 /*heading*/, 45 /*tilt*/, 0 /*roll*/);
  wwd.getNavigator().setAsLookAt(wwd.getGlobe(), lookAt);
  return wwd;
}

代码示例来源:origin: NASAWorldWind/WorldWindAndroid

this.wwd.setWorldWindowController(this.controller);

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com