cesium-native  0.41.0
RasterizedPolygonsOverlay.h
1 #pragma once
2 
3 #include "Library.h"
4 #include "RasterOverlay.h"
5 #include "RasterOverlayTileProvider.h"
6 
7 #include <CesiumAsync/AsyncSystem.h>
8 #include <CesiumGeospatial/CartographicPolygon.h>
9 #include <CesiumGeospatial/Ellipsoid.h>
10 #include <CesiumGeospatial/Projection.h>
11 
12 #include <spdlog/fwd.h>
13 
14 #include <memory>
15 #include <string>
16 #include <vector>
17 
18 namespace CesiumRasterOverlays {
19 
20 class CESIUMRASTEROVERLAYS_API RasterizedPolygonsOverlay final
21  : public RasterOverlay {
22 
23 public:
25  const std::string& name,
26  const std::vector<CesiumGeospatial::CartographicPolygon>& polygons,
27  bool invertSelection,
28  const CesiumGeospatial::Ellipsoid& ellipsoid,
29  const CesiumGeospatial::Projection& projection,
30  const RasterOverlayOptions& overlayOptions = {});
31  virtual ~RasterizedPolygonsOverlay() override;
32 
34  const CesiumAsync::AsyncSystem& asyncSystem,
35  const std::shared_ptr<CesiumAsync::IAssetAccessor>& pAssetAccessor,
36  const std::shared_ptr<CesiumUtility::CreditSystem>& pCreditSystem,
37  const std::shared_ptr<IPrepareRasterOverlayRendererResources>&
38  pPrepareRendererResources,
39  const std::shared_ptr<spdlog::logger>& pLogger,
41  const override;
42 
43  const std::vector<CesiumGeospatial::CartographicPolygon>&
44  getPolygons() const noexcept {
45  return this->_polygons;
46  }
47 
48  bool getInvertSelection() const noexcept { return this->_invertSelection; }
49 
50  const CesiumGeospatial::Ellipsoid& getEllipsoid() const noexcept {
51  return this->_ellipsoid;
52  }
53 
54 private:
55  std::vector<CesiumGeospatial::CartographicPolygon> _polygons;
56  bool _invertSelection;
57  CesiumGeospatial::Ellipsoid _ellipsoid;
58  CesiumGeospatial::Projection _projection;
59 };
60 } // namespace CesiumRasterOverlays
A system for managing asynchronous requests and tasks.
Definition: AsyncSystem.h:36
A value that will be available in the future, as produced by AsyncSystem.
Definition: Future.h:29
A quadratic surface defined in Cartesian coordinates.
Definition: Ellipsoid.h:38
The base class for a rasterized image that can be draped over a Tileset. The image may be very,...
virtual CesiumAsync::Future< CreateTileProviderResult > createTileProvider(const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< CesiumAsync::IAssetAccessor > &pAssetAccessor, const std::shared_ptr< CesiumUtility::CreditSystem > &pCreditSystem, const std::shared_ptr< IPrepareRasterOverlayRendererResources > &pPrepareRendererResources, const std::shared_ptr< spdlog::logger > &pLogger, CesiumUtility::IntrusivePointer< const RasterOverlay > pOwner) const override
Begins asynchronous creation of a tile provider for this overlay and eventually returns it via a Futu...
A smart pointer that calls addReference and releaseReference on the controlled object.
std::variant< GeographicProjection, WebMercatorProjection > Projection
A projection.
Definition: Projection.h:25
Classes for raster overlays, which allow draping massive 2D textures over a model.
Options for loading raster overlays.
Definition: RasterOverlay.h:35