cesium-native 0.43.0
Loading...
Searching...
No Matches
SimplePlanarEllipsoidCurve.h
1#pragma once
2
3#include "Library.h"
4
5#include <CesiumGeospatial/Ellipsoid.h>
6
7#include <glm/vec3.hpp>
8
9#include <optional>
10
11namespace CesiumGeospatial {
12
19class CESIUMGEOSPATIAL_API SimplePlanarEllipsoidCurve final {
20public:
38 static std::optional<SimplePlanarEllipsoidCurve>
40 const Ellipsoid& ellipsoid,
41 const glm::dvec3& sourceEcef,
42 const glm::dvec3& destinationEcef);
43
61 static std::optional<SimplePlanarEllipsoidCurve> fromLongitudeLatitudeHeight(
62 const Ellipsoid& ellipsoid,
63 const Cartographic& source,
64 const Cartographic& destination);
65
80 glm::dvec3
81 getPosition(double percentage, double additionalHeight = 0.0) const;
82
83private:
85 const Ellipsoid& ellipsoid,
86 const glm::dvec3& scaledSourceEcef,
87 const glm::dvec3& scaledDestinationEcef,
88 const glm::dvec3& originalSourceEcef,
89 const glm::dvec3& originalDestinationEcef);
90
91 double _totalAngle;
92 double _sourceHeight;
93 double _destinationHeight;
94
95 Ellipsoid _ellipsoid;
96 glm::dvec3 _sourceDirection;
97 glm::dvec3 _rotationAxis;
98 glm::dvec3 _sourceEcef;
99 glm::dvec3 _destinationEcef;
100};
101
102} // namespace CesiumGeospatial
A position defined by longitude, latitude, and height.
A quadratic surface defined in Cartesian coordinates.
Definition Ellipsoid.h:38
Produces points on an ellipse that lies on a plane that intersects the center of the earth and each o...
glm::dvec3 getPosition(double percentage, double additionalHeight=0.0) const
Samples the curve at the given percentage of its length.
static std::optional< SimplePlanarEllipsoidCurve > fromLongitudeLatitudeHeight(const Ellipsoid &ellipsoid, const Cartographic &source, const Cartographic &destination)
Creates a new instance of SimplePlanarEllipsoidCurve from a source and destination specified in carto...
static std::optional< SimplePlanarEllipsoidCurve > fromEarthCenteredEarthFixedCoordinates(const Ellipsoid &ellipsoid, const glm::dvec3 &sourceEcef, const glm::dvec3 &destinationEcef)
Creates a new instance of SimplePlanarEllipsoidCurve from a source and destination specified in Earth...
Classes for geospatial computations in Cesium.