- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中gov.nasa.worldwind.WorldWindow.requestRedraw()
方法的一些代码示例,展示了WorldWindow.requestRedraw()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorldWindow.requestRedraw()
方法的具体详情如下:
包路径:gov.nasa.worldwind.WorldWindow
类名称:WorldWindow
方法名:requestRedraw
[英]Request that this WorldWindow update its display. Prior changes to this WorldWindow's Navigator, Globe and Layers (including the contents of layers) are reflected on screen sometime after calling this method. May be called from any thread.
[中]请求此WorldWindow更新其显示。调用此方法后,之前对此WorldWindow的导航器、全局和层(包括层的内容)所做的更改会反映在屏幕上。可以从任何线程调用。
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
@Override
public void onMessage(String name, Object sender, Map<Object, Object> userProperties) {
if (name.equals(WorldWind.REQUEST_REDRAW)) {
this.requestRedraw(); // may be called on any thread
}
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
/**
* Updates the status overlay after the background processing is complete.
*/
@Override
protected void onPostExecute(Void notUsed) {
super.onPostExecute(notUsed);
statusText.setText(String.format(Locale.US, "%,d places, %,d highways and %,d countries created",
this.numPlacesCreated,
this.numHighwaysCreated,
this.numCountriesCreated));
getWorldWindow().requestRedraw();
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
/**
* Updates the aircraft placemark positions on the UI Thread.
*/
@Override
protected void onPostExecute(Void notUsed) {
super.onPostExecute(notUsed);
// Update the aircraft placemark positions with the positions computed on the background thread.
for (Placemark aircraft : aircraftPositions.keySet()) {
aircraft.setPosition(aircraftPositions.get(aircraft));
}
getWorldWindow().requestRedraw();
// Determine if the animation is done
if (frameCount > ANIMATION_FRAMES) {
// All the aircraft have arrived at their destinations; pause the animation
pauseAnimation = true;
statusText.setText("Animation complete");
}
// Re-execute the animation after the prescribed delay
if (!pauseAnimation) {
handler.postDelayed(PlacemarksMilStd2525DemoActivity.this, DELAY_TIME);
}
}
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
/**
* Updates the WorldWindow layer list on the UI Thread.
*/
@Override
protected void onPostExecute(Void notUsed) {
super.onPostExecute(notUsed);
getWorldWindow().getLayers().addLayer(this.placeLayer);
statusText.setText(String.format(Locale.US, "%,d US places created", this.numPlacesCreated));
getWorldWindow().requestRedraw();
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
@Override
public boolean handleMessage(Message msg) {
if (msg.what == MSG_ID_CLEAR_CACHE) {
renderResourceCache.clear();
} else if (msg.what == MSG_ID_REQUEST_REDRAW) {
requestRedraw();
} else if (msg.what == MSG_ID_SET_VIEWPORT) {
viewport.set((Viewport) msg.obj);
} else if (msg.what == MSG_ID_SET_DEPTH_BITS) {
depthBits = (Integer) msg.obj;
}
return false;
}
});
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
/**
* Updates the RenderableLayer on the UI Thread. Invoked by calls to publishProgress.
*
* @param renderables An array of Renderables (length = 1) to add to the shapes layer.
*/
@Override
protected void onProgressUpdate(Renderable... renderables) {
super.onProgressUpdate(renderables);
Renderable shape = renderables[0];
statusText.setText("Added " + shape.getDisplayName() + " feature...");
shapesLayer.addRenderable(shape);
getWorldWindow().requestRedraw();
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
/**
* Toggles the highlighted state of a picked object.
*/
public void togglePickedObjectHighlights() {
String message = "";
for (Object pickedObject : pickedObjects) {
if (pickedObject instanceof Highlightable) {
Highlightable highlightable = (Highlightable) pickedObject;
highlightable.setHighlighted(!highlightable.isHighlighted());
if (highlightable.isHighlighted()) {
if (!message.isEmpty()) {
message += ", ";
}
message += ((Renderable) highlightable).getDisplayName();
}
}
}
if (!message.isEmpty()) {
Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();
}
this.getWorldWindow().requestRedraw();
}
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
/**
* Toggles the selected state of a picked object.
*/
public void toggleSelection() {
// Display the highlight or normal attributes to indicate the
// selected or unselected state respectively.
if (pickedObject instanceof Highlightable) {
// Determine if we've picked a "new" object so we know to deselect the previous selection
boolean isNewSelection = pickedObject != this.selectedObject;
// Only one object can be selected at time, deselect any previously selected object
if (isNewSelection && this.selectedObject instanceof Highlightable) {
((Highlightable) this.selectedObject).setHighlighted(false);
}
// Show the selection by showing its highlight attributes
((Highlightable) pickedObject).setHighlighted(isNewSelection);
this.getWorldWindow().requestRedraw();
// Track the selected object
this.selectedObject = isNewSelection ? pickedObject : null;
}
}
}
代码示例来源: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
public void onFinished(String vehicleType) {
PlacemarksSelectDragActivity activity = (PlacemarksSelectDragActivity) getActivity();
if (activity.controller.selectedObject instanceof Placemark) {
Placemark placemark = (Placemark) activity.controller.selectedObject;
String currentType = (String) placemark.getUserProperty(this.vehicleKey);
if (currentType.equals(vehicleType)) {
return;
}
// Update the placemark's icon attributes and vehicle type property.
ImageSource imageSource = ImageSource.fromResource(this.vehicleIcons.get(vehicleType));
placemark.putUserProperty(this.vehicleKey, vehicleType);
placemark.getAttributes().setImageSource(imageSource);
placemark.getHighlightAttributes().setImageSource(imageSource);
// Show the change
activity.getWorldWindow().requestRedraw();
}
}
代码示例来源: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
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 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
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();
}
}
代码示例来源:origin: NASAWorldWind/WorldWindAndroid
@Override
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.camera.heading = WWMath.normalizeAngle360(this.beginCamera.heading + headingDegrees);
this.camera.tilt = this.beginCamera.tilt + tiltDegrees;
this.applyLimits(camera);
this.wwd.getNavigator().setAsCamera(this.wwd.getGlobe(), this.camera);
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()的具体用法。这些代码示例主要
我是一名优秀的程序员,十分优秀!