Package gov.nasa.worldwind.geom

Examples of gov.nasa.worldwind.geom.Angle


*/
public class GfrLatLon
{
   static public LatLon s_getMiddle(LatLon llnA, LatLon llnB)
   {
      Angle angAzimuth = LatLon.greatCircleAzimuth(llnA, llnB);
      Angle angAngle = LatLon.greatCircleDistance(llnA, llnB);

      return LatLon.greatCircleEndPosition(llnA, angAzimuth, angAngle.divide(2));
   }
View Full Code Here


    * @param oldPosition Previous position of shape
    * @param newPosition New position for shape
    */
   protected void moveToPosition(Position oldPosition, Position newPosition)
   {
      Angle distanceAngle = LatLon.greatCircleDistance(oldPosition, newPosition);
      Angle azimuthAngle = LatLon.greatCircleAzimuth(oldPosition, newPosition);
      measureTool.moveMeasureShape(azimuthAngle, distanceAngle);
      measureTool.firePropertyChange(GfrEditorObjShpSegWiseTool.EVENT_POSITION_REPLACE, oldPosition, newPosition);
   }
View Full Code Here

   }

   protected LatLon computeControlPointLocation(String control, Globe globe, Angle heading, LatLon center,
           double width, double height)
   {
      Angle azimuth = this.computeControlPointAzimuth(control, width, height);
      Angle pathLength = this.computeControlPointPathLength(control, width, height, globe.getRadiusAt(center));

      if (control.equals(CENTER))
      {
         return center;
      }
View Full Code Here

   {
      "SuspiciousNameCombination"
   })
   protected Angle computeControlPointAzimuth(String control, double width, double height)
   {
      Angle azimuth = null;

      if (control.equals(NORTH))
         azimuth = Angle.ZERO;
      else if (control.equals(EAST))
         azimuth = Angle.POS90;
View Full Code Here

      return azimuth != null ? computeNormalizedHeading(azimuth) : null;
   }

   protected Angle computeControlPointPathLength(String control, double width, double height, double globeRadius)
   {
      Angle pathLength = null;

      if (control.equals(NORTH) || control.equals(SOUTH))
      {
         pathLength = Angle.fromRadians((height / 2d) / globeRadius);
      }
View Full Code Here

   }

   protected LatLon computeControlPointLocation(String control, Globe globe, Angle heading, LatLon center,
           double width, double height)
   {
      Angle azimuth = this.computeControlPointAzimuth(control, width, height);
      Angle pathLength = this.computeControlPointPathLength(control, width, height, globe.getRadiusAt(center));

      if (control.equals(CENTER))
      {
         return center;
      }
View Full Code Here

   {
      "SuspiciousNameCombination"
   })
   protected Angle computeControlPointAzimuth(String control, double width, double height)
   {
      Angle azimuth = null;

      if (control.equals(NORTH))
         azimuth = Angle.ZERO;
      else if (control.equals(EAST))
         azimuth = Angle.POS90;
View Full Code Here

      return azimuth != null ? computeNormalizedHeading(azimuth) : null;
   }
  
   protected Angle computeControlPointPathLength(String control, double width, double height, double globeRadius)
   {
      Angle pathLength = null;

      if (control.equals(NORTH) || control.equals(SOUTH))
      {
         pathLength = Angle.fromRadians((height / 2d) / globeRadius);
      }
View Full Code Here

    * @param oldPosition Previous position of shape
    * @param newPosition New position for shape
    */
   protected void moveToPosition(Position oldPosition, Position newPosition)
   {
      Angle distanceAngle = LatLon.greatCircleDistance(oldPosition, newPosition);
      Angle azimuthAngle = LatLon.greatCircleAzimuth(oldPosition, newPosition);
      measureTool.moveMeasureShape(azimuthAngle, distanceAngle);
      measureTool.firePropertyChange(GfrMeasureTool.EVENT_POSITION_REPLACE, oldPosition, newPosition);
   }
View Full Code Here

    private void _initializePolygon_(WorldWindow wwd, ExtrudedPolygon polygon, boolean fitShapeToViewport)
    {
        // Creates a rectangle in the center of the viewport. Attempts to guess at a reasonable size and height.

        Position position = GfrShapeUtils.s_getNewShapePosition(wwd);
        Angle heading = GfrShapeUtils.s_getNewShapeHeading(wwd, true);
       
        double heightInMeters = fitShapeToViewport?
            GfrShapeUtils.s_getViewportScaleFactor(wwd):
                GfrFactoryObjShpPlnAbs._DBL_DEFAULT_SHAPE_SIZE_METERS;
    
View Full Code Here

TOP

Related Classes of gov.nasa.worldwind.geom.Angle

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.