Examples of computePointFromPosition()


Examples of gov.nasa.worldwind.globes.EllipsoidalGlobe.computePointFromPosition()

        // Compute ref-point position in screen coordinates.
        Position refPos = dragObject.getReferencePosition();
        if (refPos == null)
            return;

        Vec4 refPoint = globe.computePointFromPosition(refPos);
        Vec4 screenRefPoint = view.project(refPoint);

        // Compute screen-coord delta since last event.
        int dx = dragEvent.getPickPoint().x - dragEvent.getPreviousPickPoint().x;
        int dy = dragEvent.getPickPoint().y - dragEvent.getPreviousPickPoint().y;
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

      Vec4 surfacePoint = this.wwd.getSceneController().getTerrain().getSurfacePoint(
              pos.getLatitude(), pos.getLongitude());
      if (surfacePoint == null)
      {
         Globe globe = this.wwd.getModel().getGlobe();
         surfacePoint = globe.computePointFromPosition(pos.getLatitude(), pos.getLongitude(),
                 globe.getElevation(pos.getLatitude(), pos.getLongitude()));
      }

      return this.wwd.getView().project(surfacePoint);
   }
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

        Position secondVertex = this._lstMarkerControlPoints.get(1).getPosition();

        Globe globe = this._wwd.getModel().getGlobe();

        // Get cartesian points for the vertices
        Vec4 firstPoint = globe.computePointFromPosition(firstVertex);
        Vec4 secondPoint = globe.computePointFromPosition(secondVertex);

        // Find the midpoint of the line segment that connects the vertices
        Vec4 halfwayPoint = firstPoint.add3(secondPoint).divide3(2.0);
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

        Globe globe = this._wwd.getModel().getGlobe();

        // Get cartesian points for the vertices
        Vec4 firstPoint = globe.computePointFromPosition(firstVertex);
        Vec4 secondPoint = globe.computePointFromPosition(secondVertex);

        // Find the midpoint of the line segment that connects the vertices
        Vec4 halfwayPoint = firstPoint.add3(secondPoint).divide3(2.0);

        Position halfwayPosition = globe.computePositionFromPoint(halfwayPoint);
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

       
        if (surfacePoint == null)
        {
            Globe globe = this._wwd.getModel().getGlobe();
           
            surfacePoint = globe.computePointFromPosition(pos.getLatitude(), pos.getLongitude(),
                globe.getElevation(pos.getLatitude(), pos.getLongitude()));
        }

        return this._wwd.getView().project(surfacePoint);
    }
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

      Vec4 surfacePoint = this.wwd.getSceneController().getTerrain().getSurfacePoint(
              pos.getLatitude(), pos.getLongitude());
      if (surfacePoint == null)
      {
         Globe globe = this.wwd.getModel().getGlobe();
         surfacePoint = globe.computePointFromPosition(pos.getLatitude(), pos.getLongitude(),
                 globe.getElevation(pos.getLatitude(), pos.getLongitude()));
      }

      return this.wwd.getView().project(surfacePoint);
   }
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

        Globe globe = dc.getGlobe();
        double[] altitudes = segmentPlane.getPlaneAltitudes();
        LatLon[] locations = segmentPlane.getPlaneLocations();
        int mask = segmentPlane.getBorderMask();

        Vec4 p1 = globe.computePointFromPosition(locations[0].getLatitude(), locations[0].getLongitude(),
            altitudes[0]);
        Vec4 p2 = globe.computePointFromPosition(locations[0].getLatitude(), locations[0].getLongitude(),
            altitudes[1]);
        Vec4 referencePoint = p1.add3(p2).divide3(2.0);
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

        LatLon[] locations = segmentPlane.getPlaneLocations();
        int mask = segmentPlane.getBorderMask();

        Vec4 p1 = globe.computePointFromPosition(locations[0].getLatitude(), locations[0].getLongitude(),
            altitudes[0]);
        Vec4 p2 = globe.computePointFromPosition(locations[0].getLatitude(), locations[0].getLongitude(),
            altitudes[1]);
        Vec4 referencePoint = p1.add3(p2).divide3(2.0);

        double size = this.computeObjectSize(view, globe, segmentPlane, SegmentPlane.PLANE_BORDER, referencePoint,
            dc.isPickingMode());
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

     */
    protected void createLegs(DrawContext dc, ArcData arcData, Path[] paths, int startIndex, int pathCount)
    {
        Globe globe = dc.getGlobe();

        Vec4 p1 = globe.computePointFromPosition(this.position1);
        Vec4 pMid = globe.computePointFromLocation(arcData.midpoint);

        //     __\
        //     ___\
        //     ____|Mid___\ Pt. 1
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

        Globe globe = dc.getGlobe();
        Position position = segmentPlane.getSegmentPositions()[1];
        double surfaceElevation = this.computeSurfaceElevation(dc.getSurfaceGeometry(), globe,
            position.getLatitude(), position.getLongitude());

        Vec4 v1 = globe.computePointFromPosition(position.getLatitude(), position.getLongitude(),
            position.getElevation());
        Vec4 v2 = globe.computePointFromPosition(position.getLatitude(), position.getLongitude(),
            surfaceElevation);
        Vec4 referenceCenter = v1;
        v1 = v1.subtract3(referenceCenter);
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.