cesium-native 0.43.0
Loading...
Searching...
No Matches
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
18namespace CesiumRasterOverlays {
19
26class CESIUMRASTEROVERLAYS_API RasterizedPolygonsOverlay final
27 : public RasterOverlay {
28
29public:
45 const std::string& name,
46 const std::vector<CesiumGeospatial::CartographicPolygon>& polygons,
47 bool invertSelection,
48 const CesiumGeospatial::Ellipsoid& ellipsoid,
49 const CesiumGeospatial::Projection& projection,
50 const RasterOverlayOptions& overlayOptions = {});
51 virtual ~RasterizedPolygonsOverlay() override;
52
54 const CesiumAsync::AsyncSystem& asyncSystem,
55 const std::shared_ptr<CesiumAsync::IAssetAccessor>& pAssetAccessor,
56 const std::shared_ptr<CesiumUtility::CreditSystem>& pCreditSystem,
57 const std::shared_ptr<IPrepareRasterOverlayRendererResources>&
58 pPrepareRendererResources,
59 const std::shared_ptr<spdlog::logger>& pLogger,
61 const override;
62
66 const std::vector<CesiumGeospatial::CartographicPolygon>&
67 getPolygons() const noexcept {
68 return this->_polygons;
69 }
70
75 bool getInvertSelection() const noexcept { return this->_invertSelection; }
76
80 const CesiumGeospatial::Ellipsoid& getEllipsoid() const noexcept {
81 return this->_ellipsoid;
82 }
83
84private:
85 std::vector<CesiumGeospatial::CartographicPolygon> _polygons;
86 bool _invertSelection;
89};
90} // 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:11
A quadratic surface defined in Cartesian coordinates.
Definition Ellipsoid.h:38
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.