The ratio between the semi-minor axis and the semi-major axis.
The eccentricity of this ellipsoid.
The circumference at the equator.
The flattening of this ellipsoid.
StaticWGS84Gets the ENU (east/north/up) matrix for the given location in geodetic coordinates.
The latitude of the location.
The longitude of the location.
Optionaltarget: Matrix4The ENU matrix.
Gets the ENU (east/north/up) matrix for the given location.
The cartesian coordinate in the geocentric system of this ellipsoid.
Optionaltarget: Matrix4The optional matrix to set with the ENU matrix.
The ENU matrix.
Gets the dimensions (width and height) across the center of of the extent, in meters.
Note: this is distinct to Extent.dimensions which returns the dimensions in the extent's own CRS (meters or degrees).
The extent.
Optionaltarget: Vector2The object to store the result. If none, one will be created.
The extent dimensions.
Returns an approximated length of the meridian arc of the given angle, in meters.
Note: this function uses a very simplified method, as the actual method involves intrgrals. For very oblate spheroids, the results will be wrong.
The latitude of the start of the meridian arc
The latitude of the end of the meridian arc
Returns the normal of the spheroid for the given location.
The latitude, in degrees.
The longitude, in degrees.
Optionaltarget: Vector3The target vector to store the result. If none, one will be created.
The normal vector.
Returns the normal of the spheroid for the given cartesian coordinate.
The cartesian coordinates.
Optionaltarget: Vector3The target vector to store the result. If none, one will be created.
The normal vector.
Gets the distance to the horizon given a camera position.
The camera position.
Optionalcenter: Vector3The center of the ellipsoid (by default (0, 0, 0)).
The distance, in meters, from the camera to the horizon.
Returns the length of the parallel arc of the given angle, in meters.
The latitude of the parallel.
The angle of the arc in degrees.
Returns a new ellipsoid growed by the specified offset. The offset is added to the axes.
Returns the first intersection of the ray with the ellipsoid, or null if the ray does not intersect the ellipsoid.
The ray to intersect.
Optionaltarget: Vector3The optional vector to store the result.
The intersection or null if not intersection was found.
Determine whether the given point is visible from the camera or occluded by the horizon of this ellipsoid.
The camera position, in world space coordinates.
The point to test, in world space coordinates.
An optional factor to apply to ellipsoid radii to add a margin of error.
true if the given point is above the horizon, false otherwise.
Converts the geodetic coordinates to cartesian coordinates in the ECEF coordinate system.
The latitude, in degrees.
The longitude, in degrees.
The altitude, in meters, above or below the ellipsoid.
Optionaltarget: Vector3The target vector. If none, one will be created.
The cartesian coordinates.
Converts the cartesian coordinates to geodetic coordinates.
The cartesian X coordinate.
The cartesian Y coordinate.
The cartesian Z coordinate.
Optionaltarget: CoordinatesThe geodetic coordinates.
Staticsphere
A configurable spheroid that allows conversion from and to geodetic coordinates and cartesian coordinates, as well as utility function to compute various geodetic values.