@JsType(isNative=true, namespace="Cesium", name="Ellipsoid") public class Ellipsoid extends Object
Modifier and Type | Field and Description |
---|---|
static int |
packedLength
The number of elements used to pack the object into an array.
|
Constructor and Description |
---|
Ellipsoid() |
Modifier and Type | Method and Description |
---|---|
Cartographic[] |
cartesianArrayToCartographicArray(Cartesian3[] cartesians)
Converts the provided array of cartesians to an array of cartographics.
|
Cartographic[] |
cartesianArrayToCartographicArray(Cartesian3[] cartesians,
Cartographic[] result)
Converts the provided array of cartesians to an array of cartographics.
|
Cartographic |
cartesianToCartographic(Cartesian3 cartesian)
Converts the provided cartesian to cartographic representation.
|
Cartographic |
cartesianToCartographic(Cartesian3 cartesian,
Cartographic result)
Converts the provided cartesian to cartographic representation.
|
Cartesian3[] |
cartographicArrayToCartesianArray(Cartographic[] cartographics)
Converts the provided array of cartographics to an array of Cartesians.
|
Cartesian3[] |
cartographicArrayToCartesianArray(Cartographic[] cartographics,
Cartesian3[] result)
Converts the provided array of cartographics to an array of Cartesians.
|
Cartesian3 |
cartographicToCartesian(Cartographic cartographic)
Converts the provided cartographic to Cartesian representation.
|
Cartesian3 |
cartographicToCartesian(Cartographic cartographic,
Cartesian3 result)
Converts the provided cartographic to Cartesian representation.
|
static Ellipsoid |
clone(Ellipsoid ellipsoid)
Duplicates an Ellipsoid instance.
|
static Ellipsoid |
clone(Ellipsoid ellipsoid,
Ellipsoid result)
Duplicates an Ellipsoid instance.
|
boolean |
equals(Ellipsoid right)
Compares this Ellipsoid against the provided Ellipsoid componentwise and returns true if they are equal, false otherwise.
|
static Ellipsoid |
fromCartesian3(Cartesian3 radii)
Computes an Ellipsoid from a Cartesian specifying the radii in x, y, and z directions.
|
Cartesian3 |
geocentricSurfaceNormal(Cartesian3 cartesian)
Computes the unit vector directed from the center of this ellipsoid toward the provided Cartesian position.
|
Cartesian3 |
geocentricSurfaceNormal(Cartesian3 cartesian,
Cartesian3 result)
Computes the unit vector directed from the center of this ellipsoid toward the provided Cartesian position.
|
Cartesian3 |
geodeticSurfaceNormal(Cartesian3 cartesian)
Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.
|
Cartesian3 |
geodeticSurfaceNormal(Cartesian3 cartesian,
Cartesian3 result)
Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.
|
Cartesian3 |
geodeticSurfaceNormalCartographic(Cartographic cartographic)
Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.
|
Cartesian3 |
geodeticSurfaceNormalCartographic(Cartographic cartographic,
Cartesian3 result)
Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.
|
double |
maximumRadius()
Gets the maximum radius of the ellipsoid.
|
double |
minimumRadius()
Gets the minimum radius of the ellipsoid.
|
static Ellipsoid |
MOON()
An Ellipsoid instance initialized to a sphere with the lunar radius.
|
Cartesian3 |
oneOverRadii()
Gets one over the radii of the ellipsoid.
|
Cartesian3 |
oneOverRadiiSquared()
Gets one over the squared radii of the ellipsoid.
|
static double[] |
pack(Ellipsoid value,
double[] array)
Stores the provided instance into the provided array.
|
static double[] |
pack(Ellipsoid value,
double[] array,
int startingIndex)
Stores the provided instance into the provided array.
|
Cartesian3 |
radii()
Gets the radii of the ellipsoid.
|
Cartesian3 |
radiiSquared()
Gets the squared radii of the ellipsoid.
|
Cartesian3 |
radiiToTheFourth()
Gets the radii of the ellipsoid raise to the fourth power.
|
Cartesian3 |
scaleToGeocentricSurface(Cartesian3 cartesian)
Scales the provided Cartesian position along the geocentric surface normal so that it is on the surface of this ellipsoid.
|
Cartesian3 |
scaleToGeocentricSurface(Cartesian3 cartesian,
Cartesian3 result)
Scales the provided Cartesian position along the geocentric surface normal so that it is on the surface of this ellipsoid.
|
Cartesian3 |
scaleToGeodeticSurface(Cartesian3 cartesian)
Scales the provided Cartesian position along the geodetic surface normal so that it is on the surface of this ellipsoid.
|
Cartesian3 |
scaleToGeodeticSurface(Cartesian3 cartesian,
Cartesian3 result)
Scales the provided Cartesian position along the geodetic surface normal so that it is on the surface of this ellipsoid.
|
String |
toString()
Creates a string representing this Ellipsoid in the format '(radii.x, radii.y, radii.z)'.
|
Cartesian3 |
transformPositionFromScaledSpace(Cartesian3 position)
Transforms a Cartesian X, Y, Z position from the ellipsoid-scaled space by multiplying its components by the result of Ellipsoid#radii.
|
Cartesian3 |
transformPositionFromScaledSpace(Cartesian3 position,
Cartesian3 result)
Transforms a Cartesian X, Y, Z position from the ellipsoid-scaled space by multiplying its components by the result of Ellipsoid#radii.
|
Cartesian3 |
transformPositionToScaledSpace(Cartesian3 position)
Transforms a Cartesian X, Y, Z position to the ellipsoid-scaled space by multiplying its components by the result of Ellipsoid#oneOverRadii.
|
Cartesian3 |
transformPositionToScaledSpace(Cartesian3 position,
Cartesian3 result)
Transforms a Cartesian X, Y, Z position to the ellipsoid-scaled space by multiplying its components by the result of Ellipsoid#oneOverRadii.
|
static Ellipsoid |
UNIT_SPHERE()
An Ellipsoid instance initialized to radii of (1.0, 1.0, 1.0).
|
static Ellipsoid |
unpack(double[] array)
Retrieves an instance from a packed array.
|
static Ellipsoid |
unpack(double[] array,
int startingIndex,
Ellipsoid result)
Retrieves an instance from a packed array.
|
static Ellipsoid |
WGS84()
An Ellipsoid instance initialized to the WGS84 standard.
|
public static int packedLength
@JsProperty(name="MOON") public static Ellipsoid MOON()
@JsProperty(name="UNIT_SPHERE") public static Ellipsoid UNIT_SPHERE()
@JsProperty(name="WGS84") public static Ellipsoid WGS84()
@JsProperty(name="maximumRadius") public double maximumRadius()
@JsProperty(name="minimumRadius") public double minimumRadius()
@JsProperty(name="oneOverRadii") public Cartesian3 oneOverRadii()
@JsProperty(name="oneOverRadiiSquared") public Cartesian3 oneOverRadiiSquared()
@JsProperty(name="radii") public Cartesian3 radii()
@JsProperty(name="radiiSquared") public Cartesian3 radiiSquared()
@JsProperty(name="radiiToTheFourth") public Cartesian3 radiiToTheFourth()
@JsMethod public static Ellipsoid clone(Ellipsoid ellipsoid)
ellipsoid
- The ellipsoid to duplicate.@JsMethod public static Ellipsoid clone(Ellipsoid ellipsoid, Ellipsoid result)
ellipsoid
- The ellipsoid to duplicate.result
- The object onto which to store the result, or undefined if a new instance should be created. Optional.@JsMethod public static Ellipsoid fromCartesian3(Cartesian3 radii)
radii
- The ellipsoid's radius in the x, y, and z directions. Optional. Default: Cartesian3.ZERO.WGS84()
,
UNIT_SPHERE()
@JsMethod public static double[] pack(Ellipsoid value, double[] array)
value
- The value to pack.array
- The array to pack into.@JsMethod public static double[] pack(Ellipsoid value, double[] array, int startingIndex)
value
- The value to pack.array
- The array to pack into.startingIndex
- The index into the array at which to start packing the elements. Optional. Default: 0.@JsMethod public static Ellipsoid unpack(double[] array)
array
- The packed array.@JsMethod public static Ellipsoid unpack(double[] array, int startingIndex, Ellipsoid result)
array
- The packed array.startingIndex
- The starting index of the element to be unpacked. Optional.result
- The object into which to store the result. Optional.@JsMethod public Cartographic[] cartesianArrayToCartographicArray(Cartesian3[] cartesians)
cartesians
- An array of Cartesian positions.@JsMethod public Cartographic[] cartesianArrayToCartographicArray(Cartesian3[] cartesians, Cartographic[] result)
Example:
//Create an array of Cartesians and determine their Cartographic representation on a WGS84 ellipsoid.
Cartesian3[] positions = {new Cartesian3(17832.12, 83234.52, 952313.73),
new Cartesian3(17832.13, 83234.53, 952313.73),
new Cartesian3(17832.14, 83234.54, 952313.73)};
Cartographic[] cartographicPositions = Ellipsoid.WGS84.cartesianArrayToCartographicArray(positions);
cartesians
- An array of Cartesian positions.result
- The object onto which to store the result. Optional.@JsMethod public Cartographic cartesianToCartographic(Cartesian3 cartesian)
<
//Create a Cartesian and determine it's Cartographic representation on a WGS84 ellipsoid.
Cartesian3 position = new Cartesian3(17832.12, 83234.52, 952313.73);
Cartographic cartographicPosition = Ellipsoid.WGS84.cartesianToCartographic(position);
cartesian
- The Cartesian position to convert to cartographic representation.@JsMethod public Cartographic cartesianToCartographic(Cartesian3 cartesian, Cartographic result)
<
//Create a Cartesian and determine it's Cartographic representation on a WGS84 ellipsoid.
Cartesian3 position = new Cartesian3(17832.12, 83234.52, 952313.73);
Cartographic cartographicPosition = Ellipsoid.WGS84.cartesianToCartographic(position);
cartesian
- The Cartesian position to convert to cartographic representation.result
- The object onto which to store the result. Optional.@JsMethod public Cartesian3[] cartographicArrayToCartesianArray(Cartographic[] cartographics)
Cartographic[] positions = {new Cartographic(Math.toRadians(21), Math.toRadians(78), 0),
new Cartographic(Math.toRadians(21.321), Math.toRadians(78.123), 100),
new Cartographic(Math.toRadians(21.645), Math.toRadians(78.456), 250)};
Cartesian3[] cartesianPositions = Ellipsoid.WGS84.cartographicArrayToCartesianArray(positions);
cartographics
- An array of cartographic positions.@JsMethod public Cartesian3[] cartographicArrayToCartesianArray(Cartographic[] cartographics, Cartesian3[] result)
Cartographic[] positions = {new Cartographic(Math.toRadians(21), Math.toRadians(78), 0),
new Cartographic(Math.toRadians(21.321), Math.toRadians(78.123), 100),
new Cartographic(Math.toRadians(21.645), Math.toRadians(78.456), 250)};
Cartesian3[] cartesianPositions = Ellipsoid.WGS84.cartographicArrayToCartesianArray(positions);
cartographics
- An array of cartographic positions.result
- The object onto which to store the result. Optional.@JsMethod public Cartesian3 cartographicToCartesian(Cartographic cartographic)
//Create a Cartographic and determine it's Cartesian representation on a WGS84 ellipsoid.
Cartographic position = new.Cartographic(Math.toRadians(21), Math.toRadians(78), 5000);
Cartesian3 cartesianPosition = Ellipsoid.WGS84.cartographicToCartesian(position);
cartographic
- The cartographic position.@JsMethod public Cartesian3 cartographicToCartesian(Cartographic cartographic, Cartesian3 result)
//Create a Cartographic and determine it's Cartesian representation on a WGS84 ellipsoid.
Cartographic position = new.Cartographic(Math.toRadians(21), Math.toRadians(78), 5000);
Cartesian3 cartesianPosition = Ellipsoid.WGS84.cartographicToCartesian(position);
cartographic
- The cartographic position.result
- The object onto which to store the result. Optional.@JsMethod public boolean equals(Ellipsoid right)
right
- The other Ellipsoid. Optional.@JsMethod public Cartesian3 geocentricSurfaceNormal(Cartesian3 cartesian)
cartesian
- The Cartesian for which to to determine the geocentric normal.@JsMethod public Cartesian3 geocentricSurfaceNormal(Cartesian3 cartesian, Cartesian3 result)
cartesian
- The Cartesian for which to to determine the geocentric normal.result
- The object onto which to store the result. Optional.@JsMethod public Cartesian3 geodeticSurfaceNormal(Cartesian3 cartesian)
cartesian
- The Cartesian position for which to to determine the surface normal.@JsMethod public Cartesian3 geodeticSurfaceNormal(Cartesian3 cartesian, Cartesian3 result)
cartesian
- The Cartesian position for which to to determine the surface normal.result
- The object onto which to store the result. Optional.@JsMethod public Cartesian3 geodeticSurfaceNormalCartographic(Cartographic cartographic)
cartographic
- The cartographic position for which to to determine the geodetic normal.@JsMethod public Cartesian3 geodeticSurfaceNormalCartographic(Cartographic cartographic, Cartesian3 result)
cartographic
- The cartographic position for which to to determine the geodetic normal.result
- The object onto which to store the result. Optional.@JsMethod public Cartesian3 scaleToGeocentricSurface(Cartesian3 cartesian)
cartesian
- The Cartesian position to scale.@JsMethod public Cartesian3 scaleToGeocentricSurface(Cartesian3 cartesian, Cartesian3 result)
cartesian
- The Cartesian position to scale.result
- The object onto which to store the result. Optional.@JsMethod public Cartesian3 scaleToGeodeticSurface(Cartesian3 cartesian)
cartesian
- The Cartesian position to scale.@JsMethod public Cartesian3 scaleToGeodeticSurface(Cartesian3 cartesian, Cartesian3 result)
cartesian
- The Cartesian position to scale.result
- The object onto which to store the result. Optional.@JsMethod public String toString()
@JsMethod public Cartesian3 transformPositionFromScaledSpace(Cartesian3 position)
position
- The position to transform.@JsMethod public Cartesian3 transformPositionFromScaledSpace(Cartesian3 position, Cartesian3 result)
position
- The position to transform.result
- The position to which to copy the result, or undefined to create and return a new instance.@JsMethod public Cartesian3 transformPositionToScaledSpace(Cartesian3 position)
position
- The position to transform.@JsMethod public Cartesian3 transformPositionToScaledSpace(Cartesian3 position, Cartesian3 result)
position
- The position to transform.result
- The position to which to copy the result, or undefined to create and return a new instance. Optional.oneOverRadii()
Copyright © 2019. All rights reserved.