| 72 | } |
| 73 | |
| 74 | GlobeRectangle unprojectRectangleSimple( |
| 75 | const Projection& projection, |
| 76 | const CesiumGeometry::Rectangle& rectangle) { |
| 77 | struct Operation { |
| 78 | const CesiumGeometry::Rectangle& rectangle; |
| 79 | |
| 80 | GlobeRectangle operator()(const GeographicProjection& geographic) noexcept { |
| 81 | return geographic.unproject(rectangle); |
| 82 | } |
| 83 | |
| 84 | GlobeRectangle |
| 85 | operator()(const WebMercatorProjection& webMercator) noexcept { |
| 86 | return webMercator.unproject(rectangle); |
| 87 | } |
| 88 | }; |
| 89 | |
| 90 | return std::visit(Operation{rectangle}, projection); |
| 91 | } |
| 92 | |
| 93 | CesiumGeometry::AxisAlignedBox projectRegionSimple( |
| 94 | const Projection& projection, |
no outgoing calls
no test coverage detected