cesium-native
0.41.0
|
A plane tangent to an Ellipsoid at a certain origin position. More...
#include <CesiumGeospatial/EllipsoidTangentPlane.h>
Public Member Functions | |
EllipsoidTangentPlane (const glm::dvec3 &origin, const Ellipsoid &ellipsoid CESIUM_DEFAULT_ELLIPSOID) | |
Creates a new instance. More... | |
EllipsoidTangentPlane (const glm::dmat4 &eastNorthUpToFixedFrame, const Ellipsoid &ellipsoid CESIUM_DEFAULT_ELLIPSOID) | |
Creates a new instance. More... | |
const Ellipsoid & | getEllipsoid () const noexcept |
Returns the Ellipsoid. | |
const glm::dvec3 & | getOrigin () const noexcept |
Returns the origin, in cartesian coordinates. | |
const glm::dvec3 & | getXAxis () const noexcept |
Returns the x-axis of this plane. | |
const glm::dvec3 & | getYAxis () const noexcept |
Returns the y-axis of this plane. | |
const glm::dvec3 & | getZAxis () const noexcept |
Returns the z-axis (i.e. the normal) of this plane. | |
const CesiumGeometry::Plane & | getPlane () const noexcept |
Returns a CesiumGeometry::Plane representation of this plane. | |
glm::dvec2 | projectPointToNearestOnPlane (const glm::dvec3 &cartesian) const noexcept |
Computes the position of the projection of the given point on this plane. More... | |
A plane tangent to an Ellipsoid at a certain origin position.
If the origin is not on the surface of the ellipsoid, its surface projection will be used.
Definition at line 20 of file EllipsoidTangentPlane.h.
CesiumGeospatial::EllipsoidTangentPlane::EllipsoidTangentPlane | ( | const glm::dvec3 & | origin, |
const Ellipsoid &ellipsoid | CESIUM_DEFAULT_ELLIPSOID | ||
) |
Creates a new instance.
origin | The origin, in cartesian coordinates. |
ellipsoid | The ellipsoid. Default value: Ellipsoid::WGS84. |
An | std::invalid_argument if the given origin is at the center of the ellipsoid. |
CesiumGeospatial::EllipsoidTangentPlane::EllipsoidTangentPlane | ( | const glm::dmat4 & | eastNorthUpToFixedFrame, |
const Ellipsoid &ellipsoid | CESIUM_DEFAULT_ELLIPSOID | ||
) |
Creates a new instance.
eastNorthUpToFixedFrame | A transform that was computed with GlobeTransforms::eastNorthUpToFixedFrame. |
ellipsoid | The ellipsoid. Default value: Ellipsoid::WGS84. |
|
noexcept |
Computes the position of the projection of the given point on this plane.
Projects the given point on this plane, along the normal. The result will be a 2D point, referring to the local coordinate system of the plane that is given by the x- and y-axis.
cartesian | The point in cartesian coordinates. |