MCPcopy Create free account
hub / github.com/CesiumGS/cesium-native / unprojectPosition

Function unprojectPosition

CesiumGeospatial/src/Projection.cpp:37–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37Cartographic
38unprojectPosition(const Projection& projection, const glm::dvec3& position) {
39 struct Operation {
40 const glm::dvec3& position;
41
42 Cartographic operator()(const GeographicProjection& geographic) noexcept {
43 return geographic.unproject(position);
44 }
45
46 Cartographic operator()(const WebMercatorProjection& webMercator) noexcept {
47 return webMercator.unproject(position);
48 }
49 };
50
51 return std::visit(Operation{position}, projection);
52}
53
54CesiumGeometry::Rectangle projectRectangleSimple(
55 const Projection& projection,

Calls

no outgoing calls

Tested by

no test coverage detected