cesium-native 0.44.2
Loading...
Searching...
No Matches
RasterizedPolygonsOverlay.h
1#pragma once
2
3#include <CesiumAsync/AsyncSystem.h>
4#include <CesiumGeospatial/CartographicPolygon.h>
5#include <CesiumGeospatial/Ellipsoid.h>
6#include <CesiumGeospatial/Projection.h>
7#include <CesiumRasterOverlays/Library.h>
8#include <CesiumRasterOverlays/RasterOverlay.h>
9#include <CesiumRasterOverlays/RasterOverlayTileProvider.h>
10
11#include <spdlog/fwd.h>
12
13#include <memory>
14#include <string>
15#include <vector>
16
17namespace CesiumRasterOverlays {
18
25class CESIUMRASTEROVERLAYS_API RasterizedPolygonsOverlay final
26 : public RasterOverlay {
27
28public:
44 const std::string& name,
45 const std::vector<CesiumGeospatial::CartographicPolygon>& polygons,
46 bool invertSelection,
47 const CesiumGeospatial::Ellipsoid& ellipsoid,
48 const CesiumGeospatial::Projection& projection,
49 const RasterOverlayOptions& overlayOptions = {});
50 virtual ~RasterizedPolygonsOverlay() override;
51
53 const CesiumAsync::AsyncSystem& asyncSystem,
54 const std::shared_ptr<CesiumAsync::IAssetAccessor>& pAssetAccessor,
55 const std::shared_ptr<CesiumUtility::CreditSystem>& pCreditSystem,
56 const std::shared_ptr<IPrepareRasterOverlayRendererResources>&
57 pPrepareRendererResources,
58 const std::shared_ptr<spdlog::logger>& pLogger,
60 const override;
61
65 const std::vector<CesiumGeospatial::CartographicPolygon>&
66 getPolygons() const noexcept {
67 return this->_polygons;
68 }
69
74 bool getInvertSelection() const noexcept { return this->_invertSelection; }
75
79 const CesiumGeospatial::Ellipsoid& getEllipsoid() const noexcept {
80 return this->_ellipsoid;
81 }
82
83private:
84 std::vector<CesiumGeospatial::CartographicPolygon> _polygons;
85 bool _invertSelection;
88};
89} // 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 Promise.h:12
A quadratic surface defined in Cartesian coordinates.
Definition Ellipsoid.h:39
The base class for a rasterized image that can be draped over a Cesium3DTilesSelection::Tileset....
A raster overlay made from rasterizing a set of CartographicPolygon objects. The resulting overlay is...
const std::vector< CesiumGeospatial::CartographicPolygon > & getPolygons() const noexcept
Gets the polygons that are being rasterized to create this overlay.
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...
bool getInvertSelection() const noexcept
Gets the value of the invertSelection value passed to the constructor.
const CesiumGeospatial::Ellipsoid & getEllipsoid() const noexcept
Gets the ellipsoid that this overlay is being generated for.
RasterizedPolygonsOverlay(const std::string &name, const std::vector< CesiumGeospatial::CartographicPolygon > &polygons, bool invertSelection, const CesiumGeospatial::Ellipsoid &ellipsoid, const CesiumGeospatial::Projection &projection, const RasterOverlayOptions &overlayOptions={})
Creates a new RasterizedPolygonsOverlay.
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.