cesium-native
0.41.0
|
A quadratic surface defined in Cartesian coordinates. More...
#include <CesiumGeospatial/Ellipsoid.h>
Public Member Functions | |
constexpr | Ellipsoid (double x, double y, double z) noexcept |
Creates a new instance. More... | |
constexpr | Ellipsoid (const glm::dvec3 &radii) noexcept |
Creates a new instance. More... | |
constexpr const glm::dvec3 & | getRadii () const noexcept |
Returns the radii in x-, y-, and z-direction. | |
glm::dvec3 | geodeticSurfaceNormal (const glm::dvec3 &position) const noexcept |
Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position. More... | |
glm::dvec3 | geodeticSurfaceNormal (const Cartographic &cartographic) const noexcept |
Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position. More... | |
glm::dvec3 | cartographicToCartesian (const Cartographic &cartographic) const noexcept |
Converts the provided Cartographic to cartesian representation. More... | |
std::optional< Cartographic > | cartesianToCartographic (const glm::dvec3 &cartesian) const noexcept |
Converts the provided cartesian to a Cartographic representation. More... | |
std::optional< glm::dvec3 > | scaleToGeodeticSurface (const glm::dvec3 &cartesian) const noexcept |
Scales the given cartesian position along the geodetic surface normal so that it is on the surface of this ellipsoid. More... | |
std::optional< glm::dvec3 > | scaleToGeocentricSurface (const glm::dvec3 &cartesian) const noexcept |
Scales the provided cartesian position along the geocentric surface normal so that it is on the surface of this ellipsoid. More... | |
constexpr double | getMaximumRadius () const noexcept |
The maximum radius in any dimension. More... | |
constexpr double | getMinimumRadius () const noexcept |
The minimum radius in any dimension. More... | |
constexpr bool | operator== (const Ellipsoid &rhs) const noexcept |
Returns true if two elliposids are equal. | |
constexpr bool | operator!= (const Ellipsoid &rhs) const noexcept |
Returns true if two elliposids are not equal. | |
Static Public Attributes | |
static const Ellipsoid | WGS84 |
An Ellipsoid instance initialized to the WGS84 standard. More... | |
static const Ellipsoid | UNIT_SPHERE |
An Ellipsoid with all three radii set to one meter. | |
A quadratic surface defined in Cartesian coordinates.
The surface is defined by the equation (x / a)^2 + (y / b)^2 + (z / c)^2 = 1
. This is 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.
Definition at line 38 of file Ellipsoid.h.
|
inlineconstexprnoexcept |
Creates a new instance.
x | The radius in x-direction. |
y | The radius in y-direction. |
z | The radius in z-direction. |
Definition at line 61 of file Ellipsoid.h.
|
inlineconstexprnoexcept |
Creates a new instance.
radii | The radii in x-, y-, and z-direction. |
Definition at line 69 of file Ellipsoid.h.
|
noexcept |
Converts the provided cartesian to a Cartographic representation.
The result will be the empty optional if the given cartesian is at the center of this ellipsoid.
cartesian | The cartesian position. |
|
noexcept |
Converts the provided Cartographic to cartesian representation.
cartographic | The Cartographic position. |
|
noexcept |
Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.
cartographic | The Cartographic position for which to to determine the surface normal. |
|
noexcept |
Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.
position | The cartesian position for which to to determine the surface normal. |
|
inlineconstexprnoexcept |
The maximum radius in any dimension.
Definition at line 159 of file Ellipsoid.h.
|
inlineconstexprnoexcept |
The minimum radius in any dimension.
Definition at line 168 of file Ellipsoid.h.
|
noexcept |
Scales the provided cartesian position along the geocentric surface normal so that it is on the surface of this ellipsoid.
cartesian | The cartesian position to scale. @retun The scaled position, or the empty optional if the cartesian is at the center of this ellipsoid. |
|
noexcept |
Scales the given cartesian position along the geodetic surface normal so that it is on the surface of this ellipsoid.
The result will be the empty optional if the position is at the center of this ellipsoid.
cartesian | The cartesian position. |
|
static |
An Ellipsoid instance initialized to the WGS84 standard.
The ellipsoid is initialized to the World Geodetic System (WGS84) standard, as defined in https://earth-info.nga.mil/GandG/publications/tr8350.2/wgs84fin.pdf.
Definition at line 47 of file Ellipsoid.h.