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

Function projectRectangleSimple

CesiumGeospatial/src/Projection.cpp:54–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54CesiumGeometry::Rectangle projectRectangleSimple(
55 const Projection& projection,
56 const GlobeRectangle& rectangle) {
57 struct Operation {
58 const GlobeRectangle& rectangle;
59
60 CesiumGeometry::Rectangle
61 operator()(const GeographicProjection& geographic) noexcept {
62 return geographic.project(rectangle);
63 }
64
65 CesiumGeometry::Rectangle
66 operator()(const WebMercatorProjection& webMercator) noexcept {
67 return webMercator.project(rectangle);
68 }
69 };
70
71 return std::visit(Operation{rectangle}, projection);
72}
73
74GlobeRectangle unprojectRectangleSimple(
75 const Projection& projection,

Calls

no outgoing calls

Tested by 1

createTileProviderMethod · 0.68