Package gov.nasa.worldwind.render

Examples of gov.nasa.worldwind.render.Path


    @Override
    protected void _assembleVertexControlPoints_(DrawContext dc)
    {
        Terrain terrain = dc.getTerrain();
        Path pol = (Path) super._pol_;

        Position refPos = pol.getReferencePosition();
        Vec4 refPoint = terrain.getSurfacePoint(refPos.getLatitude(), refPos.getLongitude(), 0);

        int altitudeMode = pol.getAltitudeMode();
        double height = 1000; // pol.getHeight();

        Vec4 vaa = null;
        double vaaLength = 0; // used to compute independent length of each cap vertex
        double vaLength = 0;

        int i = 0;
       
        for (LatLon location : pol.getPositions())
        {
            Vec4 vert;

            // Compute the top/cap point.
            if (altitudeMode == WorldWind.CONSTANT || !(location instanceof Position))
View Full Code Here


        {
            System.out.println("this._lstMarkerControlPoints_.size() == 3, preventing remove");
            return false;
        }
       
        Path polygon = (Path) super._pol_;
        ArrayList<LatLon> locations = new ArrayList<LatLon>(this._lstMarkerControlPoints.size() - 1);

        for (LatLon latLon : polygon.getPositions())
        {
            locations.add(latLon);
        }
       
        locations.remove(vertexToRemove.getIndex());

        //polygon.setPositions(locations);
       
        java.util.List<Position> boundary2 = new ArrayList<Position>();
       
        for (LatLon ll : locations)
        {
            boundary2.add(new Position(ll, ((Position) ll).getElevation()));
        }

        polygon.setPositions(boundary2);
        return true;
    }
View Full Code Here

    public Object getValue()
    {
       if(super._pey == null)
          return (Object) null;
      
        Path epn = (Path) this._pey.getRenderable();
        Iterator<? extends LatLon> itr = epn.getPositions().iterator();
        return super._getValue(itr);
    }
View Full Code Here

    }
   
    @Override
    public void _createNewEntry()
    {
        Path polygon = GfrFactoryObjShpPlnOpn.s_getInstance().create(
                super._glcWwd, super.isResizeNewShapesToViewport());
       
        GfrEntryBltObjPikShpAbs pey = new GfrEntryBltObjPikShpOpn(polygon);
        super._createNewEntry(pey);
    }
View Full Code Here

   


    public Path create(WorldWindow wwd, boolean blnFitObjectToViewport)
    {
        Path poly = new Path();
        poly.setAttributes(GfrFactoryObjShpPlnAbs._s_getDefaultAttributes());
        poly.setValue(AVKey.DISPLAY_NAME, GfrFactoryObjShpPlnOpn._s_getNextName_(toString()));
        this._initializePolygon_(wwd, poly, blnFitObjectToViewport);

        return poly;
    }
View Full Code Here

            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);

View Full Code Here

TOP

Related Classes of gov.nasa.worldwind.render.Path

Copyright © 2018 www.massapicom. 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.