Interface GeographicProjection

  • All Known Implementing Classes:
    ProjectionWgs84

    public interface GeographicProjection
    Represents transformations between geographic coordinates and Cartesian coordinates. GeographicProjection specifies the Cartesian coordinate system used by Globe and WorldWindow.
    • Method Detail

      • getDisplayName

        java.lang.String getDisplayName()
        This projection's display name.
        Returns:
        the display name
      • geographicToCartesian

        Vec3 geographicToCartesian​(Globe globe,
                                   double latitude,
                                   double longitude,
                                   double altitude,
                                   Vec3 result)
        Converts a geographic position to Cartesian coordinates.
        Parameters:
        globe - the globe this projection is applied to
        latitude - the position's latitude in degrees
        longitude - the position's longitude in degrees
        altitude - the position's altitude in meters
        result - a pre-allocated Vec3 in which to store the computed X, Y and Z Cartesian coordinates
        Returns:
        the result argument, set to the computed Cartesian coordinates
        Throws:
        java.lang.IllegalArgumentException - If any argument is null
      • geographicToCartesianNormal

        Vec3 geographicToCartesianNormal​(Globe globe,
                                         double latitude,
                                         double longitude,
                                         Vec3 result)
      • geographicToCartesianTransform

        Matrix4 geographicToCartesianTransform​(Globe globe,
                                               double latitude,
                                               double longitude,
                                               double altitude,
                                               Matrix4 result)
      • geographicToCartesianGrid

        float[] geographicToCartesianGrid​(Globe globe,
                                          Sector sector,
                                          int numLat,
                                          int numLon,
                                          float[] height,
                                          float verticalExaggeration,
                                          Vec3 origin,
                                          float[] result,
                                          int offset,
                                          int rowStride)
      • geographicToCartesianBorder

        float[] geographicToCartesianBorder​(Globe globe,
                                            Sector sector,
                                            int numLat,
                                            int numLon,
                                            float height,
                                            Vec3 origin,
                                            float[] result)
      • cartesianToGeographic

        Position cartesianToGeographic​(Globe globe,
                                       double x,
                                       double y,
                                       double z,
                                       Position result)
        Converts a Cartesian point to a geographic position.
        Parameters:
        globe - Globe model
        x - the Cartesian point's X component
        y - the Cartesian point's Y component
        z - the Cartesian point's Z component
        result - a pre-allocated Position in which to store the computed geographic position
        Returns:
        the result argument, set to the computed geographic position
        Throws:
        java.lang.IllegalArgumentException - if the result is null
      • cartesianToLocalTransform

        Matrix4 cartesianToLocalTransform​(Globe globe,
                                          double x,
                                          double y,
                                          double z,
                                          Matrix4 result)
      • intersect

        boolean intersect​(Globe globe,
                          Line line,
                          Vec3 result)
        Computes the first intersection of a specified globe and line. The line is interpreted as a ray; intersection points behind the line's origin are ignored.
        Parameters:
        globe - the globe this projection is applied to
        line - the line to intersect with the globe
        result - a pre-allocated Vec3 in which to return the computed point
        Returns:
        true if the ray intersects the globe, otherwise false
        Throws:
        java.lang.IllegalArgumentException - If any of the globe, line or result are null