Ellipsoid

open external class Ellipsoid(x: Double? = definedExternally, y: Double? = definedExternally, z: Double? = definedExternally)(source)

A quadratic surface defined in Cartesian coordinates by the equation (x / a)^2 + (y / b)^2 + (z / c)^2 = 1. Primarily used by Cesium to represent the shape of planetary bodies.

Rather than constructing this object directly, one of the provided constants is normally used.

Parameters

x

The radius in the x direction. Default value - 0

y

The radius in the y direction. Default value - 0

z

The radius in the z direction. Default value - 0

See also

Constructors

Link copied to clipboard
constructor(x: Double? = definedExternally, y: Double? = definedExternally, z: Double? = definedExternally)

Types

Link copied to clipboard
external object Companion : Packable<Ellipsoid>

Properties

Link copied to clipboard
external val maximumRadius: Double

Gets the maximum radius of the ellipsoid.

Link copied to clipboard
external val minimumRadius: Double

Gets the minimum radius of the ellipsoid.

Link copied to clipboard
external val oneOverRadii: Cartesian3

Gets one over the radii of the ellipsoid.

Link copied to clipboard

Gets one over the squared radii of the ellipsoid.

Link copied to clipboard
external val radii: Cartesian3

Gets the radii of the ellipsoid.

Link copied to clipboard
external val radiiSquared: Cartesian3

Gets the squared radii of the ellipsoid.

Link copied to clipboard

Gets the radii of the ellipsoid raise to the fourth power.

Functions

Link copied to clipboard

Converts the provided array of cartesians to an array of cartographics.

Link copied to clipboard
external fun cartesianToCartographic(cartesian: Cartesian3, result: Cartographic? = definedExternally): Cartographic

Converts the provided cartesian to cartographic representation. The cartesian is undefined at the center of the ellipsoid.

Link copied to clipboard

Converts the provided array of cartographics to an array of Cartesians.

Link copied to clipboard
external fun cartographicToCartesian(cartographic: Cartographic, result: Cartesian3? = definedExternally): Cartesian3

Converts the provided cartographic to Cartesian representation.

Link copied to clipboard
external fun clone(result: Ellipsoid? = definedExternally): Ellipsoid

Duplicates an Ellipsoid instance.

Link copied to clipboard
external fun geocentricSurfaceNormal(cartesian: Cartesian3, result: Cartesian3? = definedExternally): Cartesian3

Computes the unit vector directed from the center of this ellipsoid toward the provided Cartesian position.

Link copied to clipboard
external fun geodeticSurfaceNormal(cartesian: Cartesian3, result: Cartesian3? = definedExternally): Cartesian3

Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.

Link copied to clipboard
external fun geodeticSurfaceNormalCartographic(cartographic: Cartographic, result: Cartesian3? = definedExternally): Cartesian3

Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.

Link copied to clipboard
external fun getLocalCurvature(surfacePosition: Cartesian3, result: Cartesian2? = definedExternally): Cartesian2

Computes the ellipsoid curvatures at a given position on the surface.

Link copied to clipboard
external fun getSurfaceNormalIntersectionWithZAxis(position: Cartesian3, buffer: Double? = definedExternally, result: Cartesian3? = definedExternally): Cartesian3?

Computes a point which is the intersection of the surface normal with the z-axis.

Link copied to clipboard
external fun scaleToGeocentricSurface(cartesian: Cartesian3, result: Cartesian3? = definedExternally): Cartesian3

Scales the provided Cartesian position along the geocentric surface normal so that it is on the surface of this ellipsoid.

Link copied to clipboard
external fun scaleToGeodeticSurface(cartesian: Cartesian3, result: Cartesian3? = definedExternally): Cartesian3

Scales the provided Cartesian position along the geodetic surface normal so that it is on the surface of this ellipsoid. If the position is at the center of the ellipsoid, this function returns undefined.

Link copied to clipboard
external fun surfaceArea(rectangle: Rectangle): Double

Computes an approximation of the surface area of a rectangle on the surface of an ellipsoid using Gauss-Legendre 10th order quadrature.

Link copied to clipboard
external fun transformPositionFromScaledSpace(position: Cartesian3, result: Cartesian3? = definedExternally): Cartesian3

Transforms a Cartesian X, Y, Z position from the ellipsoid-scaled space by multiplying its components by the result of Ellipsoid.radii.

Link copied to clipboard
external fun transformPositionToScaledSpace(position: Cartesian3, result: Cartesian3? = definedExternally): Cartesian3

Transforms a Cartesian X, Y, Z position to the ellipsoid-scaled space by multiplying its components by the result of Ellipsoid.oneOverRadii.