Examples of RenderableLayer


Examples of gov.nasa.worldwind.layers.RenderableLayer

    protected void addDocumentLayer(KMLRoot document)
    {
        KMLController controller = new KMLController(document);

        // Load the document into a new layer.
        RenderableLayer kmlLayer = new RenderableLayer();
        kmlLayer.setName((String) document.getField(AVKey.DISPLAY_NAME));
        kmlLayer.addRenderable(controller);

        this.wwd.getModel().getLayers().add(kmlLayer);
    }
View Full Code Here

Examples of gov.nasa.worldwind.layers.RenderableLayer

        protected AbstractShapeBuilderPanel builderView;
        protected AbstractShapeBuilderController builderController;

        public AppFrame()
        {
            this.shapeLayer = new RenderableLayer();
            this.shapeLayer.setName(SHAPE_LAYER_NAME);
            insertBeforePlacenames(this.getWwd(), this.shapeLayer);
            this.getLayerPanel().update(this.getWwd());

            this.builderController = new AbstractShapeBuilderController(this);
View Full Code Here

Examples of gov.nasa.worldwind.layers.RenderableLayer

            this.makeShapes();
        }

        protected void makeShapes()
        {
            RenderableLayer layer = new RenderableLayer();
            layer.setName("Surface Shapes");

            // Surface polygon over Florida.
            ShapeAttributes attrs = new BasicShapeAttributes();
            attrs.setOutlineMaterial(Material.WHITE);
            attrs.setInteriorOpacity(0.5);
            attrs.setOutlineOpacity(0.8);
            attrs.setOutlineWidth(3);
            attrs.setImageSource(SURFACE_POLYGON_IMAGE_PATH);
            attrs.setImageScale(0.5);

            double originLat = 28;
            double originLon = -82;
            Iterable<LatLon> locations = Arrays.asList(
                LatLon.fromDegrees(originLat + 5.0, originLon + 2.5),
                LatLon.fromDegrees(originLat + 5.0, originLon - 2.5),
                LatLon.fromDegrees(originLat + 2.5, originLon - 5.0),
                LatLon.fromDegrees(originLat - 2.5, originLon - 5.0),
                LatLon.fromDegrees(originLat - 5.0, originLon - 2.5),
                LatLon.fromDegrees(originLat - 5.0, originLon + 2.5),
                LatLon.fromDegrees(originLat - 2.5, originLon + 5.0),
                LatLon.fromDegrees(originLat + 2.5, originLon + 5.0),
                LatLon.fromDegrees(originLat + 5.0, originLon + 2.5));
            SurfaceShape shape = new SurfacePolygon(locations);
            shape.setAttributes(attrs);
            layer.addRenderable(shape);

            // Surface polygon spanning the international dateline.
            attrs = new BasicShapeAttributes();
            attrs.setInteriorMaterial(Material.RED);
            attrs.setOutlineMaterial(new Material(WWUtil.makeColorBrighter(Color.RED)));
            attrs.setInteriorOpacity(0.5);
            attrs.setOutlineOpacity(0.8);
            attrs.setOutlineWidth(3);

            locations = Arrays.asList(
                LatLon.fromDegrees(20, -170),
                LatLon.fromDegrees(15, 170),
                LatLon.fromDegrees(10, -175),
                LatLon.fromDegrees(5, 170),
                LatLon.fromDegrees(0, -170),
                LatLon.fromDegrees(20, -170));
            shape = new SurfacePolygon(locations);
            shape.setAttributes(attrs);
            layer.addRenderable(shape);

            // Surface ellipse over the center of the United States.
            attrs = new BasicShapeAttributes();
            attrs.setInteriorMaterial(Material.CYAN);
            attrs.setOutlineMaterial(new Material(WWUtil.makeColorBrighter(Color.CYAN)));
            attrs.setInteriorOpacity(0.5);
            attrs.setOutlineOpacity(0.8);
            attrs.setOutlineWidth(3);

            shape = new SurfaceEllipse(LatLon.fromDegrees(38, -104), 1.5e5, 1e5, Angle.fromDegrees(15));
            shape.setAttributes(attrs);
            layer.addRenderable(shape);

            // Surface circle over the center of the United states.
            attrs = new BasicShapeAttributes();
            attrs.setInteriorMaterial(Material.GREEN);
            attrs.setOutlineMaterial(new Material(WWUtil.makeColorBrighter(Color.GREEN)));
            attrs.setInteriorOpacity(0.5);
            attrs.setOutlineOpacity(0.8);
            attrs.setOutlineWidth(3);

            shape = new SurfaceCircle(LatLon.fromDegrees(36, -104), 1e5);
            shape.setAttributes(attrs);
            layer.addRenderable(shape);

            // Surface circle over the North Pole
            shape = new SurfaceCircle(LatLon.fromDegrees(90, 0), 1e6);
            shape.setAttributes(attrs);
            layer.addRenderable(shape);

            // Surface quadrilateral over the center of the United States.
            attrs = new BasicShapeAttributes();
            attrs.setInteriorMaterial(Material.ORANGE);
            attrs.setOutlineMaterial(new Material(WWUtil.makeColorBrighter(Color.ORANGE)));
            attrs.setInteriorOpacity(0.5);
            attrs.setOutlineOpacity(0.8);
            attrs.setOutlineWidth(3);

            shape = new SurfaceQuad(LatLon.fromDegrees(42, -104), 1e5, 1.3e5, Angle.fromDegrees(20));
            shape.setAttributes(attrs);
            layer.addRenderable(shape);

            // Surface square over the center of the United states.
            attrs = new BasicShapeAttributes();
            attrs.setInteriorMaterial(Material.MAGENTA);
            attrs.setOutlineMaterial(new Material(WWUtil.makeColorBrighter(Color.MAGENTA)));
            attrs.setInteriorOpacity(0.5);
            attrs.setOutlineOpacity(0.8);
            attrs.setOutlineWidth(3);

            shape = new SurfaceSquare(LatLon.fromDegrees(45, -104), 1e5);
            shape.setAttributes(attrs);
            layer.addRenderable(shape);

            // Surface sector over Mt. Shasta.
            attrs = new BasicShapeAttributes();
            attrs.setInteriorMaterial(Material.YELLOW);
            attrs.setOutlineMaterial(new Material(WWUtil.makeColorBrighter(Color.YELLOW)));
            attrs.setInteriorOpacity(0.5);
            attrs.setOutlineOpacity(0.8);
            attrs.setOutlineWidth(3);

            shape = new SurfaceSector(new Sector(
                Angle.fromDegrees(41.0), Angle.fromDegrees(41.6),
                Angle.fromDegrees(-122.5), Angle.fromDegrees(-121.7)));
            shape.setAttributes(attrs);
            layer.addRenderable(shape);

            // Surface sector over Lake Tahoe.
            attrs = new BasicShapeAttributes();
            attrs.setInteriorMaterial(Material.CYAN);
            attrs.setOutlineMaterial(new Material(WWUtil.makeColorBrighter(Color.CYAN)));
            attrs.setInteriorOpacity(0.5);
            attrs.setOutlineOpacity(0.8);
            attrs.setOutlineWidth(3);

            shape = new SurfaceSector(new Sector(
                Angle.fromDegrees(38.9), Angle.fromDegrees(39.3),
                Angle.fromDegrees(-120.2), Angle.fromDegrees(-119.9)));
            shape.setAttributes(attrs);
            layer.addRenderable(shape);

            // Surface polyline spanning the international dateline.
            attrs = new BasicShapeAttributes();
            attrs.setOutlineMaterial(Material.RED);
            attrs.setOutlineWidth(3);
            attrs.setOutlineStippleFactor(2);

            locations = Arrays.asList(
                LatLon.fromDegrees(-10, 170),
                LatLon.fromDegrees(-10, -170));
            shape = new SurfacePolyline(locations);
            shape.setAttributes(attrs);
            ((SurfacePolyline) shape).setClosed(false);
            layer.addRenderable(shape);

            // Add the layer to the model and update the layer panel.
            insertBeforeCompass(this.getWwd(), layer);
            this.getLayerPanel().update(this.getWwd());
        }
View Full Code Here

Examples of gov.nasa.worldwind.layers.RenderableLayer

   {
      super();
     
      this._www_ = www;
     
      this._rlrContent_ = new RenderableLayer();
      GfrCtrAnnCntImgs._s_insertBeforePlacenames_(this._www_, this._rlrContent_);

      this._www_.addSelectListener((SelectListener) this);
   }
View Full Code Here

Examples of gov.nasa.worldwind.layers.RenderableLayer

    {
        public AppFrame()
        {
            super(true, true, false);

            RenderableLayer layer = new RenderableLayer();

            // Create and set an attribute bundle.
            ShapeAttributes attrs = new BasicShapeAttributes();
            attrs.setOutlineMaterial(Material.RED);
            attrs.setOutlineWidth(2d);

            // Create a path, set some of its properties and set its attributes.
            ArrayList<Position> pathPositions = new ArrayList<Position>();
            /*pathPositions.add(Position.fromDegrees(49.01653274909177, -122.7349081128505, 1));
            pathPositions.add(Position.fromDegrees(49.01715024535254, -122.7596194200486, 10));
            pathPositions.add(Position.fromDegrees(49.02781845803761, -122.7651733463364, 100));*/
            pathPositions.add(Position.fromDegrees(41.5438, 2.4430, 0));
            pathPositions.add(Position.fromDegrees(41.58955, 2.4677, 0));
            /*pathPositions.add(Position.fromDegrees(49.09727187849899, -122.8187118695457, 1000));
            pathPositions.add(Position.fromDegrees(49.1002974270654, -122.7348314826556, 100));
            pathPositions.add(Position.fromDegrees(49.11190305133165, -122.7345541413842, 100));
            pathPositions.add(Position.fromDegrees(49.11101764617014, -122.7455553490629, 10));
            pathPositions.add(Position.fromDegrees(49.11509767012883, -122.7459193678911, 10));
            pathPositions.add(Position.fromDegrees(49.11467371318521, -122.7563706291131, 10));*/

            Path path = new DirectedPath(pathPositions);

            //SurfacePolyline path = new SurfacePolyline();
           
            // To ensure that the arrowheads resize smoothly, refresh each time the path is drawn.
            path.setAttributes(attrs);
            path.setVisible(true);
           
            path.setAltitudeMode(WorldWind.CLAMP_TO_GROUND);
           
            path.setFollowTerrain(true);
            /*path.setAltitudeMode(WorldWind.RELATIVE_TO_GROUND);*/
           
            path.setPathType(AVKey.GREAT_CIRCLE);
            layer.addRenderable(path);

            // Add the layer to the model.
            insertBeforeCompass(getWwd(), layer);

            // Update layer panel
View Full Code Here

Examples of gov.nasa.worldwind.layers.RenderableLayer

   {
      super();
     
      this._glcWwd = glcWwd;
     
      this._rlr = new RenderableLayer();
   }
View Full Code Here

Examples of gov.nasa.worldwind.layers.RenderableLayer

  
   public void detach()
   {
      this.getController().setEnabled(false);

      RenderableLayer layer = this._ctrAnnotationImages_.getContentLayer();
      layer.removeRenderable(this.getAnnotation());
   }
View Full Code Here

Examples of gov.nasa.worldwind.layers.RenderableLayer

   public void attach()
   {
      this.getController().setEnabled(true);

      RenderableLayer layer = this._ctrAnnotationImages_.getContentLayer();
      layer.removeRenderable(this.getAnnotation());
      layer.addRenderable(this.getAnnotation());
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.