cesium-native 0.43.0
Loading...
Searching...
No Matches
Cartographic.h
1#pragma once
2
3#include "Library.h"
4
5#include <CesiumUtility/Math.h>
6
7namespace CesiumGeospatial {
8
12class CESIUMGEOSPATIAL_API Cartographic final {
13public:
21 constexpr Cartographic(
22 double longitudeRadians,
23 double latitudeRadians,
24 double heightMeters = 0.0) noexcept
25 : longitude(longitudeRadians),
26 latitude(latitudeRadians),
27 height(heightMeters) {}
28
39 static constexpr Cartographic fromDegrees(
40 double longitudeDegrees,
41 double latitudeDegrees,
42 double heightMeters = 0.0) noexcept {
43 return Cartographic(
46 heightMeters);
47 }
48
52 constexpr bool operator==(const Cartographic& rhs) const noexcept {
53 return this->longitude == rhs.longitude && this->latitude == rhs.latitude &&
54 this->height == rhs.height;
55 };
56
60 double longitude;
61
65 double latitude;
66
70 double height;
71};
72} // 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:320
Classes for geospatial computations in Cesium.