cesium-native  0.41.0
CesiumGeospatial::EllipsoidTangentPlane Class Referencefinal

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 EllipsoidgetEllipsoid () 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::PlanegetPlane () 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ EllipsoidTangentPlane() [1/2]

CesiumGeospatial::EllipsoidTangentPlane::EllipsoidTangentPlane ( const glm::dvec3 &  origin,
const Ellipsoid &ellipsoid  CESIUM_DEFAULT_ELLIPSOID 
)

Creates a new instance.

Parameters
originThe origin, in cartesian coordinates.
ellipsoidThe ellipsoid. Default value: Ellipsoid::WGS84.
Exceptions
Anstd::invalid_argument if the given origin is at the center of the ellipsoid.

◆ EllipsoidTangentPlane() [2/2]

CesiumGeospatial::EllipsoidTangentPlane::EllipsoidTangentPlane ( const glm::dmat4 &  eastNorthUpToFixedFrame,
const Ellipsoid &ellipsoid  CESIUM_DEFAULT_ELLIPSOID 
)

Creates a new instance.

Parameters
eastNorthUpToFixedFrameA transform that was computed with GlobeTransforms::eastNorthUpToFixedFrame.
ellipsoidThe ellipsoid. Default value: Ellipsoid::WGS84.

Member Function Documentation

◆ projectPointToNearestOnPlane()

glm::dvec2 CesiumGeospatial::EllipsoidTangentPlane::projectPointToNearestOnPlane ( const glm::dvec3 &  cartesian) const
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.

Parameters
cartesianThe point in cartesian coordinates.
Returns
The 2D representation of the point on the plane that is closest to the given position.

The documentation for this class was generated from the following file: