Examples of Globe


Examples of gov.nasa.worldwind.globes.Globe

    @Override
    protected void moveControlPoint(GfrMrkMoveHoriz controlPoint, Point lastMousePoint, Point moveToPoint)
    {
        View view = super._wwd.getView();
        Globe globe = super._wwd.getModel().getGlobe();

        Position refPos = controlPoint.getPosition();
        if (refPos == null)
            return;

        Line ray = view.computeRayFromScreenPoint(moveToPoint.getX(), moveToPoint.getY());
        Line previousRay = view.computeRayFromScreenPoint(lastMousePoint.getX(), lastMousePoint.getY());

        Vec4 vec = AirspaceEditorUtil.intersectGlobeAt(super._wwd, refPos.getElevation(), ray);
        Vec4 previousVec = AirspaceEditorUtil.intersectGlobeAt(super._wwd, refPos.getElevation(), previousRay);

        if (vec == null || previousVec == null)
        {
            return;
        }

        Position pos = globe.computePositionFromPoint(vec);
        Position previousPos = globe.computePositionFromPoint(previousVec);
        LatLon change = pos.subtract(previousPos);

        java.util.List<LatLon> boundary = new ArrayList<LatLon>();
  
        for (LatLon ll : ((Path) this._pol_).getPositions()) 
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe

    @Override
    protected void moveControlPoint(GfrMrkMoveHoriz controlPoint, Point lastMousePoint, Point moveToPoint)
    {
        View view = super._wwd.getView();
        Globe globe = super._wwd.getModel().getGlobe();

        Position refPos = controlPoint.getPosition();
        if (refPos == null)
            return;

        Line ray = view.computeRayFromScreenPoint(moveToPoint.getX(), moveToPoint.getY());
        Line previousRay = view.computeRayFromScreenPoint(lastMousePoint.getX(), lastMousePoint.getY());

        Vec4 vec = AirspaceEditorUtil.intersectGlobeAt(super._wwd, refPos.getElevation(), ray);
        Vec4 previousVec = AirspaceEditorUtil.intersectGlobeAt(super._wwd, refPos.getElevation(), previousRay);

        if (vec == null || previousVec == null)
        {
            return;
        }

        Position pos = globe.computePositionFromPoint(vec);
        Position previousPos = globe.computePositionFromPoint(previousVec);
        LatLon change = pos.subtract(previousPos);

        java.util.List<LatLon> boundary = new ArrayList<LatLon>();
        for (LatLon ll : ((ExtrudedPolygon) super._pol_).getOuterBoundary())
        {
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe

   }

   // *** Metric accessors ***
   public double getLength()
   {
      Globe globe = this.wwd.getModel().getGlobe();

      if (this.line != null)
         return this.line.getLength(globe);

      if (this.surfaceShape != null)
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe

   {
      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

        // Intersect a ray through each mouse point, with a geoid passing through the reference elevation.
        // If either ray fails to intersect the geoid, then ignore this event. Use the difference between the two
        // intersected positions to move the control point's location.

        View view = this._wwd.getView();
        Globe globe = this._wwd.getModel().getGlobe();

        Position refPos = this._pol_.getReferencePosition();
        if (refPos == null)
            return;

        Line ray = view.computeRayFromScreenPoint(mousePoint.getX(), mousePoint.getY());
        Line previousRay = view.computeRayFromScreenPoint(previousMousePoint.getX(), previousMousePoint.getY());

        Vec4 vec = AirspaceEditorUtil.intersectGlobeAt(this._wwd, refPos.getElevation(), ray);
        Vec4 previousVec = AirspaceEditorUtil.intersectGlobeAt(this._wwd, refPos.getElevation(), previousRay);

        if (vec == null || previousVec == null)
        {
            return;
        }

        Position pos = globe.computePositionFromPoint(vec);
        Position previousPos = globe.computePositionFromPoint(previousVec);
        LatLon change = pos.subtract(previousPos);

        this._pol_.move(new Position(change.getLatitude(), change.getLongitude(), 0.0));
    }
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe

        // Add one control point for the height between the first and second vertices.
        // TODO: ensure that this control point is visible
        Position firstVertex = this._lstMarkerControlPoints.get(0).getPosition();
        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);

        Position halfwayPosition = globe.computePositionFromPoint(halfwayPoint);
       
        this._lstMarkerControlPoints.add(new GfrMrkMoveVert(halfwayPosition, halfwayPoint,
            this._bmaControlHeight, this._lstMarkerControlPoints.size()));
    }
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe

        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

   public static void main(String[] args)
   {
      try
      {
         // Create a Model for each window, starting with the Globe they share.
         Globe earth = new Earth();
         // Create layers that both World Windows can share.
         Layer[] layers = new Layer[]
         {
            new StarsLayer(),
            new CompassLayer(),
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe

   }

   // *** Metric accessors ***
   public double getLength()
   {
      Globe globe = this.wwd.getModel().getGlobe();

      if (this.line != null)
         return this.line.getLength(globe);

      if (this.surfaceShape != null)
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe

   {
      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
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.