cesium-native 0.43.0
Loading...
Searching...
No Matches
CesiumRasterOverlays::RasterizedPolygonsOverlay Class Referencefinal

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>

Inheritance diagram for CesiumRasterOverlays::RasterizedPolygonsOverlay:
CesiumRasterOverlays::RasterOverlay CesiumUtility::ReferenceCounted< T, isThreadSafe >

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< CreateTileProviderResultcreateTileProvider (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::EllipsoidgetEllipsoid () 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.
 
RasterOverlayOptionsgetOptions () noexcept
 Gets options for this overlay.
 
const RasterOverlayOptionsgetOptions () 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< RasterOverlayTileProvidercreatePlaceholder (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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ RasterizedPolygonsOverlay()

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.

Parameters
nameThe user-given name of this polygon layer.
polygonsThe CartographicPolygon objects to rasterize.
invertSelectionIf true, the overlay's colors will be inverted. The pixels inside of polygons will be black, and those outside will be white.
ellipsoidThe ellipsoid that this RasterOverlay is being generated for.
projectionThe projection that this RasterOverlay is being generated for.
overlayOptionsOptions to use for this RasterOverlay.

Member Function Documentation

◆ createTileProvider()

virtual CesiumAsync::Future< CreateTileProviderResult > CesiumRasterOverlays::RasterizedPolygonsOverlay::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
overridevirtual

Begins asynchronous creation of a tile provider for this overlay and eventually returns it via a Future.

Parameters
asyncSystemThe async system used to do work in threads.
pAssetAccessorThe interface used to download assets like overlay metadata and tiles.
pCreditSystemThe CesiumUtility::CreditSystem to use when creating a per-TileProvider CesiumUtility::Credit.
pPrepareRendererResourcesThe interface used to prepare raster images for rendering.
pLoggerThe logger to which to send messages about the tile provider and tiles.
pOwnerThe overlay that owns this overlay, or nullptr if this overlay is not aggregated.
Returns
The future that resolves to the tile provider when it is ready, or to error details in the case of an error.

Implements CesiumRasterOverlays::RasterOverlay.

◆ getEllipsoid()

const CesiumGeospatial::Ellipsoid & CesiumRasterOverlays::RasterizedPolygonsOverlay::getEllipsoid ( ) const
inlinenoexcept

Gets the ellipsoid that this overlay is being generated for.

Definition at line 80 of file RasterizedPolygonsOverlay.h.

◆ getInvertSelection()

bool CesiumRasterOverlays::RasterizedPolygonsOverlay::getInvertSelection ( ) const
inlinenoexcept

Gets the value of the invertSelection value passed to the constructor.

Definition at line 75 of file RasterizedPolygonsOverlay.h.

◆ getPolygons()

const std::vector< CesiumGeospatial::CartographicPolygon > & CesiumRasterOverlays::RasterizedPolygonsOverlay::getPolygons ( ) const
inlinenoexcept

Gets the polygons that are being rasterized to create this overlay.

Definition at line 67 of file RasterizedPolygonsOverlay.h.


The documentation for this class was generated from the following file: