本文整理汇总了Java中gov.nasa.worldwind.awt.WorldWindowGLCanvas.setModel方法的典型用法代码示例。如果您正苦于以下问题:Java WorldWindowGLCanvas.setModel方法的具体用法?Java WorldWindowGLCanvas.setModel怎么用?Java WorldWindowGLCanvas.setModel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gov.nasa.worldwind.awt.WorldWindowGLCanvas
的用法示例。
在下文中一共展示了WorldWindowGLCanvas.setModel方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initWorldWindLayerModel
import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入方法依赖的package包/类
private void initWorldWindLayerModel()
{
Model model = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
model.setShowWireframeExterior(false);
model.setShowWireframeInterior(false);
model.setShowTessellationBoundingVolumes(false);
if (is3DGlobe) {
model.setGlobe(new Earth());
} else {
model.setGlobe(new EarthFlat());
}
world = new WorldWindowGLCanvas();
world.setModel(model);
}
示例2: ZoomEvents
import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入方法依赖的package包/类
public ZoomEvents()
{
WorldWindowGLCanvas wwd = new WorldWindowGLCanvas();
wwd.setPreferredSize(new java.awt.Dimension(1000, 800));
this.getContentPane().add(wwd, java.awt.BorderLayout.CENTER);
wwd.setModel(new BasicModel());
final Observable<Double> viewEvents = ViewObservables.fromWorldWindViewZooms((OrbitView) wwd.getView());
viewEvents.subscribe(new Observer<Double>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
}
@Override
public void onNext(Double propertyChangeEvent) {
System.out.println("VIEW CHANGE");
}
});
// mouseEventObservable.subscribe(EventConsumer.createMouseEventConsumer());
}
示例3: SimpleShapeDraggingRx
import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入方法依赖的package包/类
public SimpleShapeDraggingRx(){
final WorldWindowGLCanvas wwd = new WorldWindowGLCanvas();
wwd.setPreferredSize(new java.awt.Dimension(1000, 800));
this.getContentPane().add(wwd, java.awt.BorderLayout.CENTER);
wwd.setModel(new BasicModel());
// Add a layer containing an image
SurfaceImage si = new SurfaceImage("images/400x230-splash-nww.png", Sector.fromDegrees(35, 45, -115, -95));
RenderableLayer layer = new RenderableLayer();
layer.addRenderable(si);
insertBeforePlacenames(wwd, layer);
final BasicDraggerRx draggableSurfaceImage = BasicDraggerRx.makeDraggable(wwd, si);
final Observable<Observable<Position>> dragStreams = draggableSurfaceImage.observePositions();
dragStreams.subscribe(new Action1<Observable<Position>>() {
@Override
public void call(Observable<Position> positionObservable) {
System.out.println("BEGINNING DRAG");
positionObservable.subscribe(new rx.Observer<Position>() {
@Override
public void onCompleted() {
System.out.println("DRAGGING COMPLETED");
}
@Override
public void onError(Throwable e) {}
@Override
public void onNext(Position position) {
//dragging object
}
});
}
});
}
示例4: ConsumeZoomEvents
import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入方法依赖的package包/类
public ConsumeZoomEvents()
{
WorldWindowGLCanvas wwd = new WorldWindowGLCanvas();
wwd.setPreferredSize(new java.awt.Dimension(1000, 800));
this.getContentPane().add(wwd, java.awt.BorderLayout.CENTER);
wwd.setModel(new BasicModel());
final Observable<MouseWheelEvent> mouseWheelObservable =
MouseObservables.fromWorldWindMouseWheelEvents(wwd.getInputHandler());
mouseWheelObservable.subscribe(EventConsumer.createMouseEventConsumer());
}