cesium-native 0.44.2
Loading...
Searching...
No Matches
Cartographic.h
1#pragma once
2
3#include <CesiumGeospatial/Library.h>
4#include <CesiumUtility/Math.h>
5
6namespace CesiumGeospatial {
7
11class CESIUMGEOSPATIAL_API Cartographic final {
12public:
20 constexpr Cartographic(
21 double longitudeRadians,
22 double latitudeRadians,
23 double heightMeters = 0.0) noexcept
24 : longitude(longitudeRadians),
25 latitude(latitudeRadians),
26 height(heightMeters) {}
27
38 static constexpr Cartographic fromDegrees(
39 double longitudeDegrees,
40 double latitudeDegrees,
41 double heightMeters = 0.0) noexcept {
42 return Cartographic(
45 heightMeters);
46 }
47
51 constexpr bool operator==(const Cartographic& rhs) const noexcept {
52 return this->longitude == rhs.longitude && this->latitude == rhs.latitude &&
53 this->height == rhs.height;
54 };
55
59 double longitude;
60
64 double latitude;
65
69 double height;
70};
71} // namespace CesiumGeospatial
A position defined by longitude, latitude, and height.
double height
The height, in meters.
static constexpr Cartographic fromDegrees(double longitudeDegrees, double latitudeDegrees, double heightMeters=0.0) noexcept
Creates a new instance from a longitude and latitude specified in degrees, and a height given in mete...
double longitude
The longitude, in radians.
constexpr bool operator==(const Cartographic &rhs) const noexcept
Returns true if two cartographics are equal.
constexpr Cartographic(double longitudeRadians, double latitudeRadians, double heightMeters=0.0) noexcept
Creates a new instance.
double latitude
The latitude, in radians.
static constexpr double degreesToRadians(double angleDegrees) noexcept
Converts degrees to radians.
Definition Math.h:325
Classes for geospatial computations in Cesium.