当前位置: 首页>>代码示例>>Java>>正文


Java WorldWindowGLCanvas.setModel方法代码示例

本文整理汇总了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);
}
 
开发者ID:vobject,项目名称:maru,代码行数:17,代码来源:WorldWindMap.java

示例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());
    }
 
开发者ID:eddieburns55,项目名称:RxWorldwind,代码行数:29,代码来源:ZoomEvents.java

示例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
                }
            });
        }
    });
}
 
开发者ID:eddieburns55,项目名称:RxWorldwind,代码行数:37,代码来源:SimpleShapeDraggingRx.java

示例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());
}
 
开发者ID:eddieburns55,项目名称:RxWorldwind,代码行数:13,代码来源:ConsumeZoomEvents.java


注:本文中的gov.nasa.worldwind.awt.WorldWindowGLCanvas.setModel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。