- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中gov.nasa.worldwind.WorldWindow.getNavigator()
方法的一些代码示例,展示了WorldWindow.getNavigator()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorldWindow.getNavigator()
方法的具体详情如下:
包路径:gov.nasa.worldwind.WorldWindow
类名称:WorldWindow
方法名:getNavigator
暂无
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
@Override
public void creationSucceeded(LayerFactory factory, Layer layer) {
// Add the finished GeoPackage layer to the WorldWindow.
getWorldWindow().getLayers().addLayer(layer);
// Place the viewer directly over the GeoPackage image.
getWorldWindow().getNavigator().setLatitude(36.8139677556754);
getWorldWindow().getNavigator().setLongitude(-76.03260320181615);
getWorldWindow().getNavigator().setAltitude(20e3);
Log.i("gov.nasa.worldwind", "GeoPackage layer creation succeeded");
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
@Override
protected void gestureDidBegin() {
if (this.activeGestures++ == 0) {
this.wwd.getNavigator().getAsCamera(this.wwd.getGlobe(), this.beginCamera);
this.camera.set(this.beginCamera);
}
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
protected void gestureDidBegin() {
if (this.activeGestures++ == 0) {
this.wwd.getNavigator().getAsLookAt(this.wwd.getGlobe(), this.beginLookAt);
this.lookAt.set(this.beginLookAt);
}
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
protected void positionView(WorldWindow wwd) {
LookAt lookAt = new LookAt().set(46.230, -122.190, 500, WorldWind.ABSOLUTE, 1.5e4 /*range*/, 45.0 /*heading*/, 70.0 /*tilt*/, 0 /*roll*/);
wwd.getNavigator().setAsLookAt(this.getWorldWindow().getGlobe(), lookAt);
}
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
@Override
public void run() {
this.wwd.getNavigator().setAsCamera(this.wwd.getGlobe(), this.camera);
this.wwd.requestRedraw();
pool.release(this.reset());
}
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
protected void positionView(WorldWindow wwd) {
Position mtRainier = new Position(46.852886, -121.760374, 4392.0);
Position eye = new Position(46.912, -121.527, 2000.0);
// Compute heading and distance from peak to eye
Globe globe = wwd.getGlobe();
double heading = eye.greatCircleAzimuth(mtRainier);
double distanceRadians = mtRainier.greatCircleDistance(eye);
double distance = distanceRadians * globe.getRadiusAt(mtRainier.latitude, mtRainier.longitude);
// Compute camera settings
double altitude = eye.altitude - mtRainier.altitude;
double range = Math.sqrt(altitude * altitude + distance * distance);
double tilt = Math.toDegrees(Math.atan(distance / eye.altitude));
// Apply the new view
Camera camera = new Camera();
camera.set(eye.latitude, eye.longitude, eye.altitude, WorldWind.ABSOLUTE, heading, tilt, 0.0 /*roll*/);
wwd.getNavigator().setAsCamera(globe, camera);
}
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setAboutBoxTitle("About the " + this.getResources().getText(R.string.title_placemarks_milstd2525));
setAboutBoxText("Demonstrates how to add MilStd2525C Symbols to a RenderableLayer.");
// Create a TextView to show the MIL-STD-2525 renderer's initialization status
this.statusText = new TextView(this);
this.statusText.setTextColor(android.graphics.Color.YELLOW);
FrameLayout globeLayout = (FrameLayout) findViewById(R.id.globe);
globeLayout.addView(this.statusText);
// Set the camera to look at the area where the symbols will be displayed.
Position pos = new Position(32.4520, 63.44553, 0);
LookAt lookAt = new LookAt().set(pos.latitude, pos.longitude, pos.altitude, WorldWind.ABSOLUTE,
1e5 /*range*/, 0 /*heading*/, 45 /*tilt*/, 0 /*roll*/);
this.getWorldWindow().getNavigator().setAsLookAt(this.getWorldWindow().getGlobe(), lookAt);
// The MIL-STD-2525 rendering library takes time initialize, we'll perform this task via the
// AsyncTask's background thread and then load the symbols in its post execute handler.
new InitializeSymbolsTask().execute();
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
@Override
public void doFrame(long frameTimeNanos) {
if (this.lastFrameTimeNanos != 0) {
// Compute the frame duration in seconds.
double frameDurationSeconds = (frameTimeNanos - this.lastFrameTimeNanos) * 1.0e-9;
double cameraDegrees = (frameDurationSeconds * this.cameraDegreesPerSecond);
// Move the navigator to continuously bring new tiles into view.
Navigator navigator = getWorldWindow().getNavigator();
navigator.setLongitude(navigator.getLongitude() + cameraDegrees);
// Redraw the WorldWindow to display the above changes.
this.getWorldWindow().requestRedraw();
}
Choreographer.getInstance().postFrameCallback(this);
this.lastFrameTimeNanos = frameTimeNanos;
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
@Override
public void doFrame(long frameTimeNanos) {
if (this.lastFrameTimeNanos != 0) {
// Compute the frame duration in seconds.
double frameDurationSeconds = (frameTimeNanos - this.lastFrameTimeNanos) * 1.0e-9;
double cameraDegrees = (frameDurationSeconds * this.cameraDegreesPerSecond);
// Move the navigator to simulate the Earth's rotation about its axis.
Navigator navigator = getWorldWindow().getNavigator();
navigator.setLongitude(navigator.getLongitude() - cameraDegrees);
// Redraw the WorldWindow to display the above changes.
this.getWorldWindow().requestRedraw();
}
if (!this.activityPaused) { // stop animating when this Activity is paused
Choreographer.getInstance().postFrameCallback(this);
}
this.lastFrameTimeNanos = frameTimeNanos;
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
@Override
public void doFrame(long frameTimeNanos) {
if (this.lastFrameTimeNanos != 0) {
// Compute the frame duration in seconds.
double frameDurationSeconds = (frameTimeNanos - this.lastFrameTimeNanos) * 1.0e-9;
double cameraDegrees = (frameDurationSeconds * this.cameraDegreesPerSecond);
// Move the navigator to simulate the Earth's rotation about its axis.
Navigator navigator = getWorldWindow().getNavigator();
navigator.setLongitude(navigator.getLongitude() - cameraDegrees);
// Redraw the WorldWindow to display the above changes.
this.getWorldWindow().requestRedraw();
}
if (!this.activityPaused) { // stop animating when this Activity is paused
Choreographer.getInstance().postFrameCallback(this);
}
this.lastFrameTimeNanos = frameTimeNanos;
}
代码示例来源: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
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setAboutBoxTitle("About the " + this.getResources().getText(R.string.title_basic_stress_test));
this.setAboutBoxText("Continuously moves the navigator in an Easterly direction from a low altitude.");
// Add the ShowTessellation layer to provide some visual feedback regardless of texture details
this.getWorldWindow().getLayers().addLayer(new ShowTessellationLayer());
// Initialize the Navigator so that it's looking in the direction of movement and the horizon is visible.
Navigator navigator = this.getWorldWindow().getNavigator();
navigator.setAltitude(1e3); // 1 km
navigator.setHeading(90); // looking east
navigator.setTilt(75); // looking at the horizon
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
protected void handlePinch(GestureRecognizer recognizer) {
int state = recognizer.getState();
float scale = ((PinchRecognizer) recognizer).getScale();
if (state == WorldWind.BEGAN) {
this.gestureDidBegin();
} else if (state == WorldWind.CHANGED) {
if (scale != 0) {
// Apply the change in scale to the navigator, relative to when the gesture began.
this.lookAt.range = this.beginLookAt.range / scale;
this.applyLimits(this.lookAt);
this.wwd.getNavigator().setAsLookAt(this.wwd.getGlobe(), this.lookAt);
this.wwd.requestRedraw();
}
} else if (state == WorldWind.ENDED || state == WorldWind.CANCELLED) {
this.gestureDidEnd();
}
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
protected void handleRotate(GestureRecognizer recognizer) {
int state = recognizer.getState();
float rotation = ((RotationRecognizer) recognizer).getRotation();
if (state == WorldWind.BEGAN) {
this.gestureDidBegin();
this.lastRotation = 0;
} else if (state == WorldWind.CHANGED) {
// Apply the change in rotation to the navigator, relative to the navigator's current values.
double headingDegrees = this.lastRotation - rotation;
this.lookAt.heading = WWMath.normalizeAngle360(this.lookAt.heading + headingDegrees);
this.lastRotation = rotation;
this.wwd.getNavigator().setAsLookAt(this.wwd.getGlobe(), this.lookAt);
this.wwd.requestRedraw();
} else if (state == WorldWind.ENDED || state == WorldWind.CANCELLED) {
this.gestureDidEnd();
}
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
@Override
protected void handleRotate(GestureRecognizer recognizer) {
int state = recognizer.getState();
float rotation = ((RotationRecognizer) recognizer).getRotation();
if (state == WorldWind.BEGAN) {
this.gestureDidBegin();
this.lastRotation = 0;
} else if (state == WorldWind.CHANGED) {
// Apply the change in rotation to the navigator, relative to the navigator's current values.
double headingDegrees = this.lastRotation - rotation;
this.camera.heading = WWMath.normalizeAngle360(this.camera.heading + headingDegrees);
this.lastRotation = rotation;
this.wwd.getNavigator().setAsCamera(this.wwd.getGlobe(), this.camera);
this.wwd.requestRedraw();
} else if (state == WorldWind.ENDED || state == WorldWind.CANCELLED) {
this.gestureDidEnd();
}
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
@Override
protected void handlePinch(GestureRecognizer recognizer) {
int state = recognizer.getState();
float scale = ((PinchRecognizer) recognizer).getScale();
if (state == WorldWind.BEGAN) {
this.gestureDidBegin();
} else if (state == WorldWind.CHANGED) {
if (scale != 0) {
// Apply the change in scale to the navigator, relative to when the gesture began.
scale = ((scale - 1) * 0.1f) + 1; // dampen the scale factor
this.camera.altitude = this.camera.altitude * scale;
this.applyLimits(this.camera);
this.wwd.getNavigator().setAsCamera(this.wwd.getGlobe(), this.camera);
this.wwd.requestRedraw();
}
} else if (state == WorldWind.ENDED || state == WorldWind.CANCELLED) {
this.gestureDidEnd();
}
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
@Override
public void run() {
this.wwd.getNavigator().getAsCamera(this.wwd.getGlobe(), this.beginCamera);
this.beginPos.set(this.beginCamera.latitude, this.beginCamera.longitude, this.beginCamera.altitude);
for (int i = 0; i < this.steps; i++) {
double amount = (double) i / (double) (this.steps - 1);
this.beginPos.interpolateAlongPath(this.endPos, WorldWind.GREAT_CIRCLE, amount, this.curPos);
this.curCamera.latitude = this.curPos.latitude;
this.curCamera.longitude = this.curPos.longitude;
this.curCamera.altitude = this.curPos.altitude;
this.curCamera.heading = WWMath.interpolateAngle360(amount, this.beginCamera.heading, this.endCamera.heading);
this.curCamera.tilt = WWMath.interpolateAngle180(amount, this.beginCamera.tilt, this.endCamera.tilt);
this.curCamera.roll = WWMath.interpolateAngle180(amount, this.beginCamera.roll, this.endCamera.roll);
Runnable setCommand = SetCameraCommand.obtain(this.wwd, this.curCamera);
runOnActivityThread(setCommand);
sleepQuietly(FRAME_INTERVAL);
}
}
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
@Override
public void doFrame(long frameTimeNanos) {
if (this.lastFrameTimeNanos != 0) {
// Compute the frame duration in seconds.
double frameDurationSeconds = (frameTimeNanos - this.lastFrameTimeNanos) * 1.0e-9;
double cameraDegrees = (frameDurationSeconds * this.cameraDegreesPerSecond);
double lightDegrees = (frameDurationSeconds * this.lightDegreesPerSecond);
// Move the navigator to simulate the Earth's rotation about its axis.
Navigator navigator = getWorldWindow().getNavigator();
navigator.setLongitude(navigator.getLongitude() - cameraDegrees);
// Move the sun location to simulate the Sun's rotation about the Earth.
this.sunLocation.set(this.sunLocation.latitude, this.sunLocation.longitude - lightDegrees);
this.atmosphereLayer.setLightLocation(this.sunLocation);
// Redraw the WorldWindow to display the above changes.
this.getWorldWindow().requestRedraw();
}
if (!this.activityPaused) { // stop animating when this Activity is paused
Choreographer.getInstance().postFrameCallback(this);
}
this.lastFrameTimeNanos = frameTimeNanos;
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setAboutBoxTitle("About the " + this.getResources().getText(R.string.title_day_night_cycle));
setAboutBoxText("Demonstrates how to display a continuous day-night cycle on the WorldWind globe.\n" +
"This gradually changes both the Navigator's location and the AtmosphereLayer's light location.");
// Initialize the Atmosphere layer's light location to our custom location. By default the light location is
// always behind the viewer.
LayerList layers = this.getWorldWindow().getLayers();
this.atmosphereLayer = (AtmosphereLayer) layers.getLayer(layers.indexOfLayerNamed("Atmosphere"));
this.atmosphereLayer.setLightLocation(this.sunLocation);
// Initialize the Navigator so that the sun is behind the viewer.
Navigator navigator = this.getWorldWindow().getNavigator();
navigator.setLatitude(20);
navigator.setLongitude(this.sunLocation.longitude);
// Use this Activity's Choreographer to animate the day-night cycle.
Choreographer.getInstance().postFrameCallback(this);
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
protected void handleTilt(GestureRecognizer recognizer) {
int state = recognizer.getState();
float dx = recognizer.getTranslationX();
float dy = recognizer.getTranslationY();
if (state == WorldWind.BEGAN) {
this.gestureDidBegin();
this.lastRotation = 0;
} else if (state == WorldWind.CHANGED) {
// Apply the change in tilt to the navigator, relative to when the gesture began.
double headingDegrees = 180 * dx / this.wwd.getWidth();
double tiltDegrees = -180 * dy / this.wwd.getHeight();
this.lookAt.heading = WWMath.normalizeAngle360(this.beginLookAt.heading + headingDegrees);
this.lookAt.tilt = this.beginLookAt.tilt + tiltDegrees;
this.applyLimits(this.lookAt);
this.wwd.getNavigator().setAsLookAt(this.wwd.getGlobe(), this.lookAt);
this.wwd.requestRedraw();
} else if (state == WorldWind.ENDED || state == WorldWind.CANCELLED) {
this.gestureDidEnd();
}
}
我在 JavaFX 中有一个包含对象的组,我想将其添加到名为 wwd 的 World Wind Canvas 中。 我的组名为cube,其中包含一个我想在地球上方的 World Wind 空间中显示的
我正在从事一个项目,该项目还涉及从 NASA 的 JPL Asterank API 查询数据。问题是我想根据小行星的名称查询小行星,例如:Photographica、Ceres 等。但是它没有返回我期
本文整理了Java中gov.nasa.worldwind.util.WWMath类的一些代码示例,展示了WWMath类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Mav
我想就传单包寻求一些帮助。当您绘制交互式 map 时,您可以执行以下操作。 library(leaflet) library(magrittr) m % setView(lng = -71.
如果您对二进制文件有所了解,我相信这真的很简单,但我是这方面的新手。 我如何从 NASA .hgt 文件中提取数据?以下是来自 www2.jpl.nasa.gov/srtm/faq.html 的描述:
有人对此有 PHP 解决方案吗? 我们的目标是拥有一个接受这些的函数 Hello World Hello World 你好 IBM 并返回这些 Hello World Hello World 你好 I
我正在从事与 nasa worldwind 相关的项目。 任何人都可以向我解释一下,我可以删除世界地图吗? 位于屏幕左上方。 最佳答案 如果您使用的是自定义 layers.xml 文件,您可以注释掉以
有人对此有 PHP 解决方案吗? 我们的目标是拥有一个接受这些的函数 Hello World Hello World 你好 IBM 并返回这些 Hello World Hello World 你好 I
我有包含二进制数据的文件。这是规范: The SRTM data files have names like "N34W119.hgt". What do the letters and number
尝试获取行星的 body 固定条件,RA、DEC、PM,使用 NASA 的示例。 ftp://naif.jpl.nasa.gov/pub/naif/toolkit_docs/FORTRAN/spice
所以我有一个 JSON 对象。 jsonData 如果我控制台记录它,我可以看到它包含我所理解的一个名为 near_earth_objects 的二维数组,在这个二维数组中有一个名为 absolute
本文整理了Java中gov.nasa.worldwind.WorldWindow.pixelSizeAtDistance()方法的一些代码示例,展示了WorldWindow.pixelSizeAtDi
本文整理了Java中gov.nasa.worldwind.WorldWindow.onResume()方法的一些代码示例,展示了WorldWindow.onResume()的具体用法。这些代码示例主要
本文整理了Java中gov.nasa.worldwind.WorldWindow.setWorldWindowController()方法的一些代码示例,展示了WorldWindow.setWorld
本文整理了Java中gov.nasa.worldwind.WorldWindow.()方法的一些代码示例,展示了WorldWindow.()的具体用法。这些代码示例主要来源于Github/Stacko
本文整理了Java中gov.nasa.worldwind.WorldWindow.redraw()方法的一些代码示例,展示了WorldWindow.redraw()的具体用法。这些代码示例主要来源于G
本文整理了Java中gov.nasa.worldwind.WorldWindow.getNavigator()方法的一些代码示例,展示了WorldWindow.getNavigator()的具体用法。
本文整理了Java中gov.nasa.worldwind.WorldWindow.distanceToViewGlobeExtents()方法的一些代码示例,展示了WorldWindow.distan
本文整理了Java中gov.nasa.worldwind.WorldWindow.requestRedraw()方法的一些代码示例,展示了WorldWindow.requestRedraw()的具体用
本文整理了Java中gov.nasa.worldwind.WorldWindow.getModel()方法的一些代码示例,展示了WorldWindow.getModel()的具体用法。这些代码示例主要
我是一名优秀的程序员,十分优秀!