cesium-native 0.43.0
Loading...
Searching...
No Matches
EarthGravitationalModel1996Grid.h
1#pragma once
2
3#include "Library.h"
4
5#include <cstdint>
6#include <optional>
7#include <span>
8#include <string>
9#include <vector>
10
11namespace CesiumGeospatial {
12
13class Cartographic;
14
23class CESIUMGEOSPATIAL_API EarthGravitationalModel1996Grid final {
24public:
35 static std::optional<EarthGravitationalModel1996Grid>
36 fromBuffer(const std::span<const std::byte>& buffer);
37
47 double sampleHeight(const Cartographic& position) const;
48
49private:
50 EarthGravitationalModel1996Grid(std::vector<int16_t>&& gridValues);
51
55 double getHeightForIndices(size_t vertical, size_t horizontal) const;
56
57 std::vector<int16_t> _gridValues;
58};
59
60} // namespace CesiumGeospatial
A position defined by longitude, latitude, and height.
Loads and queries heights from an Earth Gravitational Model 1996 (EGM96) grid.
static std::optional< EarthGravitationalModel1996Grid > fromBuffer(const std::span< const std::byte > &buffer)
Attempts to create a EarthGravitationalModel1996Grid from the given buffer.
double sampleHeight(const Cartographic &position) const
Samples the height at the given position.
Classes for geospatial computations in Cesium.