Globe

open class Globe(var ellipsoid: Ellipsoid = Ellipsoid.WGS84, var projection: GeographicProjection = Wgs84Projection(), var geoid: Geoid = EGM96Geoid())

Planet or celestial object approximated by a reference ellipsoid and elevation models. Globe expresses its ellipsoidal parameters and elevation values in meters.

Constructors

Link copied to clipboard
constructor(ellipsoid: Ellipsoid = Ellipsoid.WGS84, projection: GeographicProjection = Wgs84Projection(), geoid: Geoid = EGM96Geoid())

Types

Link copied to clipboard

An offset to apply to this globe when translating between Geographic positions and Cartesian points. Used during scrolling to position points appropriately.

Link copied to clipboard
data class State(ellipsoid: Ellipsoid, projectionName: String, geoidName: String)

Used to compare states during rendering to determine whether globe-state dependent cached values must be updated.

Properties

Link copied to clipboard

Represents the elevations for an area, often but not necessarily the whole globe.

Link copied to clipboard

The globe's reference ellipsoid defining the globe's equatorial radius and polar radius.

Link copied to clipboard

Indicates the radius in meters of the globe's ellipsoid at the equator.

Link copied to clipboard

Represents Gravitational Model of the globe

Link copied to clipboard

Indicates whether this is a 2D globe.

Link copied to clipboard

Indicates whether this projection is continuous with itself horizontally.

Link copied to clipboard

The globe offset in 2D continuous projection. Center is the default for 3D.

Link copied to clipboard

Indicates the radius in meters of the globe's ellipsoid at the poles.

Link copied to clipboard

Indicates the geographic projection used by this globe. The projection specifies this globe's Cartesian coordinate system.

Link copied to clipboard

Indicates the geographic limits of this projection.

Link copied to clipboard

Current globe state.

Link copied to clipboard

Vertical exaggeration (VE) is a scale that is used to emphasize vertical features, which might be too small to identify relative to the horizontal scale.

Functions

Link copied to clipboard

Converts a Cartesian point to a geographic position. This globe's projection specifies the Cartesian coordinate system.

Link copied to clipboard
Link copied to clipboard
fun geographicToCartesian(latitude: Angle, longitude: Angle, altitude: Double, result: Vec3): Vec3

Converts a geographic position to Cartesian coordinates. This globe's projection specifies the Cartesian coordinate system.

Link copied to clipboard
fun geographicToCartesianBorder(sector: Sector, numLat: Int, numLon: Int, height: Float, origin: Vec3, result: FloatArray): FloatArray
Link copied to clipboard
fun geographicToCartesianGrid(sector: Sector, numLat: Int, numLon: Int, height: FloatArray?, origin: Vec3?, result: FloatArray, rowOffset: Int = 0, rowStride: Int = 0): FloatArray
Link copied to clipboard
fun geographicToCartesianNormal(latitude: Angle, longitude: Angle, result: Vec3): Vec3
Link copied to clipboard
fun geographicToCartesianTransform(latitude: Angle, longitude: Angle, altitude: Double, result: Matrix4): Matrix4
Link copied to clipboard
fun getAbsolutePosition(latitude: Angle, longitude: Angle): Position

Get absolute position with terrain elevation at specified coordinates

fun getAbsolutePosition(position: Position, altitudeMode: AltitudeMode): Position

Get absolute position for specified position and specified altitude mode

Link copied to clipboard
fun getElevation(latitude: Angle, longitude: Angle, retrieve: Boolean = false): Double

Determine terrain altitude in specified geographic point from elevation model

Link copied to clipboard
fun getElevationGrid(gridSector: Sector, gridWidth: Int, gridHeight: Int, result: FloatArray)

Gets elevation values for the specified sector with required width and height resolution, including Geoid offset

Link copied to clipboard
fun getElevationLimits(sector: Sector, result: FloatArray)

Gets elevation limits at specified sector, including Geoid offset

Link copied to clipboard
fun getRadiusAt(latitude: Angle, longitude: Angle): Double

Indicates the radius in meters of the globe's ellipsoid at a specified location.

Link copied to clipboard

Indicates the distance to the globe's horizon from a specified height above the globe's ellipsoid. The result of this method is undefined if the height is negative.

Link copied to clipboard
fun intersect(line: Line, result: Vec3): Boolean

Computes the first intersection of this globe with a specified line. The line is interpreted as a ray; intersection points behind the line's origin are ignored.

Link copied to clipboard

Checks if elevation data influencing the specified sector could have changed after the specified timestamp