cesium-native 0.43.0
|
A raster overlay made from rasterizing a set of CartographicPolygon objects. The resulting overlay is monochromatic - white where pixels are inside of the polygons, and black where they are not. More...
#include <CesiumRasterOverlays/RasterizedPolygonsOverlay.h>
Public Member Functions | |
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. | |
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 Future. | |
const std::vector< CesiumGeospatial::CartographicPolygon > & | getPolygons () const noexcept |
Gets the polygons that are being rasterized to create this overlay. | |
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. | |
Public Member Functions inherited from CesiumRasterOverlays::RasterOverlay | |
RasterOverlay (const std::string &name, const RasterOverlayOptions &overlayOptions=RasterOverlayOptions()) | |
Creates a new instance. | |
CesiumAsync::SharedFuture< void > & | getAsyncDestructionCompleteEvent (const CesiumAsync::AsyncSystem &asyncSystem) |
A future that resolves when this RasterOverlay has been destroyed (i.e. its destructor has been called) and all async operations that it was executing have completed. | |
const std::string & | getName () const noexcept |
Gets the name of this overlay. | |
RasterOverlayOptions & | getOptions () noexcept |
Gets options for this overlay. | |
const RasterOverlayOptions & | getOptions () const noexcept |
Gets options for this overlay. | |
const std::vector< CesiumUtility::Credit > & | getCredits () const noexcept |
Gets the credits for this overlay. | |
std::vector< CesiumUtility::Credit > & | getCredits () noexcept |
Gets the credits for this overlay. | |
CesiumUtility::IntrusivePointer< RasterOverlayTileProvider > | createPlaceholder (const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< CesiumAsync::IAssetAccessor > &pAssetAccessor, const CesiumGeospatial::Ellipsoid &ellipsoid=CesiumGeospatial::Ellipsoid::WGS84) const |
Create a placeholder tile provider can be used in place of the real one while createTileProvider completes asynchronously. | |
Public Member Functions inherited from CesiumUtility::ReferenceCounted< T, isThreadSafe > | |
void | addReference () const |
Adds a counted reference to this object. Use CesiumUtility::IntrusivePointer instead of calling this method directly. | |
void | releaseReference () const |
Removes a counted reference from this object. When the last reference is removed, this method will delete this instance. Use CesiumUtility::IntrusivePointer instead of calling this method directly. | |
std::int32_t | getReferenceCount () const noexcept |
Returns the current reference count of this instance. | |
Additional Inherited Members | |
Public Types inherited from CesiumRasterOverlays::RasterOverlay | |
using | CreateTileProviderResult |
A result from a call to createTileProvider. This is expected to be an IntrusivePointer to a RasterOverlayTileProvider, but may be a RasterOverlayLoadFailureDetails if creating the tile provider wasn't successful. | |
A raster overlay made from rasterizing a set of CartographicPolygon objects. The resulting overlay is monochromatic - white where pixels are inside of the polygons, and black where they are not.
Definition at line 26 of file RasterizedPolygonsOverlay.h.
CesiumRasterOverlays::RasterizedPolygonsOverlay::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.
name | The user-given name of this polygon layer. |
polygons | The CartographicPolygon objects to rasterize. |
invertSelection | If true, the overlay's colors will be inverted. The pixels inside of polygons will be black, and those outside will be white. |
ellipsoid | The ellipsoid that this RasterOverlay is being generated for. |
projection | The projection that this RasterOverlay is being generated for. |
overlayOptions | Options to use for this RasterOverlay. |
|
overridevirtual |
Begins asynchronous creation of a tile provider for this overlay and eventually returns it via a Future.
asyncSystem | The async system used to do work in threads. |
pAssetAccessor | The interface used to download assets like overlay metadata and tiles. |
pCreditSystem | The CesiumUtility::CreditSystem to use when creating a per-TileProvider CesiumUtility::Credit . |
pPrepareRendererResources | The interface used to prepare raster images for rendering. |
pLogger | The logger to which to send messages about the tile provider and tiles. |
pOwner | The overlay that owns this overlay, or nullptr if this overlay is not aggregated. |
Implements CesiumRasterOverlays::RasterOverlay.
|
inlinenoexcept |
Gets the ellipsoid that this overlay is being generated for.
Definition at line 80 of file RasterizedPolygonsOverlay.h.
|
inlinenoexcept |
Gets the value of the invertSelection
value passed to the constructor.
Definition at line 75 of file RasterizedPolygonsOverlay.h.
|
inlinenoexcept |
Gets the polygons that are being rasterized to create this overlay.
Definition at line 67 of file RasterizedPolygonsOverlay.h.