cesium-native  0.41.0
CesiumRasterOverlays::RasterOverlay Class Referenceabstract

The base class for a rasterized image that can be draped over a Tileset. The image may be very, very high resolution, so only small pieces of it are mapped to the Tileset at a time. More...

#include <CesiumRasterOverlays/RasterOverlay.h>

Inheritance diagram for CesiumRasterOverlays::RasterOverlay:
CesiumUtility::ReferenceCounted< T, isThreadSafe > CesiumUtility::ThreadIdHolder< true > CesiumRasterOverlays::BingMapsRasterOverlay CesiumRasterOverlays::DebugColorizeTilesRasterOverlay CesiumRasterOverlays::IonRasterOverlay CesiumRasterOverlays::RasterizedPolygonsOverlay CesiumRasterOverlays::TileMapServiceRasterOverlay CesiumRasterOverlays::WebMapServiceRasterOverlay CesiumRasterOverlays::WebMapTileServiceRasterOverlay

Public Types

using CreateTileProviderResult = nonstd::expected< CesiumUtility::IntrusivePointer< RasterOverlayTileProvider >, RasterOverlayLoadFailureDetails >
 

Public Member Functions

 RasterOverlay (const std::string &name, const RasterOverlayOptions &overlayOptions=RasterOverlayOptions())
 Creates a new instance. More...
 
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. More...
 
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. More...
 
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 CESIUM_DEFAULT_ELLIPSOID) const
 Create a placeholder tile provider can be used in place of the real one while createTileProvider completes asynchronously. More...
 
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 =0
 Begins asynchronous creation of a tile provider for this overlay and eventually returns it via a Future. More...
 
- 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.
 

Detailed Description

The base class for a rasterized image that can be draped over a Tileset. The image may be very, very high resolution, so only small pieces of it are mapped to the Tileset at a time.

Instances of this class can be added to the RasterOverlayCollection that is returned by Tileset::getOverlays.

Instances of this class must be allocated on the heap, and their lifetimes must be managed with CesiumUtility::IntrusivePointer.

See also
BingMapsRasterOverlay
IonRasterOverlay
TileMapServiceRasterOverlay
WebMapServiceRasterOverlay

Definition at line 134 of file RasterOverlay.h.

Constructor & Destructor Documentation

◆ RasterOverlay()

CesiumRasterOverlays::RasterOverlay::RasterOverlay ( const std::string &  name,
const RasterOverlayOptions overlayOptions = RasterOverlayOptions() 
)

Creates a new instance.

Parameters
nameThe user-given name of this overlay layer.
overlayOptionsThe RasterOverlayOptions for this instance.

Member Function Documentation

◆ createPlaceholder()

CesiumUtility::IntrusivePointer<RasterOverlayTileProvider> CesiumRasterOverlays::RasterOverlay::createPlaceholder ( const CesiumAsync::AsyncSystem asyncSystem,
const std::shared_ptr< CesiumAsync::IAssetAccessor > &  pAssetAccessor,
const CesiumGeospatial::Ellipsoid &ellipsoid  CESIUM_DEFAULT_ELLIPSOID 
) const

Create a placeholder tile provider can be used in place of the real one while createTileProvider completes asynchronously.

Parameters
asyncSystemThe async system used to do work in threads.
pAssetAccessorThe interface used to download assets like overlay metadata and tiles.
Returns
The placeholder.

◆ createTileProvider()

virtual CesiumAsync::Future<CreateTileProviderResult> CesiumRasterOverlays::RasterOverlay::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
pure virtual

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 CreditSystem to use when creating a per-TileProvider 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.

Implemented in CesiumRasterOverlays::WebMapTileServiceRasterOverlay, CesiumRasterOverlays::WebMapServiceRasterOverlay, CesiumRasterOverlays::TileMapServiceRasterOverlay, CesiumRasterOverlays::RasterizedPolygonsOverlay, CesiumRasterOverlays::IonRasterOverlay, CesiumRasterOverlays::DebugColorizeTilesRasterOverlay, and CesiumRasterOverlays::BingMapsRasterOverlay.

◆ getAsyncDestructionCompleteEvent()

CesiumAsync::SharedFuture<void>& CesiumRasterOverlays::RasterOverlay::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.

Parameters
asyncSystemThe AsyncSystem to use for the returned SharedFuture, if required. If this method is called multiple times, all invocations must pass AsyncSystem instances that compare equal to each other.

◆ getOptions()

const RasterOverlayOptions& CesiumRasterOverlays::RasterOverlay::getOptions ( ) const
inlinenoexcept

Gets options for this overlay.

Definition at line 171 of file RasterOverlay.h.


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