cesium-native 0.52.0
Loading...
Searching...
No Matches
CesiumRasterOverlays::RasterOverlayTileProvider Class Referenceabstract

Provides individual tiles for a RasterOverlay on demand. More...

#include <CesiumRasterOverlays/RasterOverlayTileProvider.h>

Inheritance diagram for CesiumRasterOverlays::RasterOverlayTileProvider:
CesiumUtility::ReferenceCounted< T, false > CesiumRasterOverlays::QuadtreeRasterOverlayTileProvider

Public Member Functions

 RasterOverlayTileProvider (const CesiumUtility::IntrusivePointer< const RasterOverlay > &pOwner, const RasterOverlayExternals &externals, const CesiumGeospatial::Projection &projection, const CesiumGeometry::Rectangle &coverageRectangle) noexcept
 Creates a new instance.
 
 RasterOverlayTileProvider (const CesiumUtility::IntrusivePointer< const RasterOverlay > &pOwner, const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< CesiumAsync::IAssetAccessor > &pAssetAccessor, const std::shared_ptr< CesiumUtility::CreditSystem > &pCreditSystem, std::optional< CesiumUtility::Credit > credit, const std::shared_ptr< IPrepareRasterOverlayRendererResources > &pPrepareRendererResources, const std::shared_ptr< spdlog::logger > &pLogger, const CesiumGeospatial::Projection &projection, const CesiumGeometry::Rectangle &coverageRectangle) noexcept
 Creates a new instance.
 
virtual ~RasterOverlayTileProvider () noexcept
 Default destructor.
 
CesiumAsync::SharedFuture< void > & getAsyncDestructionCompleteEvent ()
 A future that resolves when this RasterOverlayTileProvider has been destroyed (i.e. its destructor has been called) and all async operations that it was executing have completed.
 
RasterOverlaygetOwner () noexcept
 Returns the RasterOverlay that created this instance.
 
const RasterOverlaygetOwner () const noexcept
 Returns the RasterOverlay that created this instance.
 
const RasterOverlayExternalsgetExternals () const noexcept
 Get the external interfaces for use by the tile provider.
 
const std::shared_ptr< CesiumAsync::IAssetAccessor > & getAssetAccessor () const noexcept
 Get the system to use for asychronous requests and threaded work.
 
const std::shared_ptr< CesiumUtility::CreditSystem > & getCreditSystem () const noexcept
 Get the credit system that receives credits from this tile provider.
 
const CesiumAsync::AsyncSystemgetAsyncSystem () const noexcept
 Gets the async system used to do work in threads.
 
const std::shared_ptr< IPrepareRasterOverlayRendererResources > & getPrepareRendererResources () const noexcept
 Gets the interface used to prepare raster overlay images for rendering.
 
const std::shared_ptr< spdlog::logger > & getLogger () const noexcept
 Gets the logger to which to send messages about the tile provider and tiles.
 
const CesiumGeospatial::ProjectiongetProjection () const noexcept
 Returns the CesiumGeospatial::Projection of this instance.
 
const CesiumGeometry::RectanglegetCoverageRectangle () const noexcept
 Returns the coverage CesiumGeometry::Rectangle of this instance.
 
const std::optional< CesiumUtility::Credit > & getCredit () const noexcept
 Get the per-TileProvider CesiumUtility::Credit if one exists.
 
virtual CesiumAsync::Future< LoadedRasterOverlayImageloadTileImage (const RasterOverlayTile &overlayTile)=0
 Loads the image for a tile.
 
virtual void addCredits (CesiumUtility::CreditReferencer &creditReferencer) noexcept
 Adds this tile provider's credits to a credit referencer.
 
- Public Member Functions inherited from CesiumUtility::ReferenceCounted< T, false >
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.
 
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.
 

Protected Member Functions

CesiumAsync::Future< LoadedRasterOverlayImageloadTileImageFromUrl (const std::string &url, const std::vector< CesiumAsync::IAssetAccessor::THeader > &headers={}, LoadTileImageFromUrlOptions &&options={}) const
 Loads an image from a URL and optionally some request headers.
 

Detailed Description

Provides individual tiles for a RasterOverlay on demand.

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

Definition at line 135 of file RasterOverlayTileProvider.h.

Constructor & Destructor Documentation

◆ RasterOverlayTileProvider() [1/2]

CesiumRasterOverlays::RasterOverlayTileProvider::RasterOverlayTileProvider ( const CesiumUtility::IntrusivePointer< const RasterOverlay > & pOwner,
const RasterOverlayExternals & externals,
const CesiumGeospatial::Projection & projection,
const CesiumGeometry::Rectangle & coverageRectangle )
noexcept

Creates a new instance.

Parameters
pOwnerThe raster overlay that created this tile provider.
externalsThe external interfaces for use by the raster overlay.
projectionThe CesiumGeospatial::Projection.
coverageRectangleThe rectangle that bounds all the area covered by this overlay, expressed in projected coordinates.

◆ RasterOverlayTileProvider() [2/2]

CesiumRasterOverlays::RasterOverlayTileProvider::RasterOverlayTileProvider ( const CesiumUtility::IntrusivePointer< const RasterOverlay > & pOwner,
const CesiumAsync::AsyncSystem & asyncSystem,
const std::shared_ptr< CesiumAsync::IAssetAccessor > & pAssetAccessor,
const std::shared_ptr< CesiumUtility::CreditSystem > & pCreditSystem,
std::optional< CesiumUtility::Credit > credit,
const std::shared_ptr< IPrepareRasterOverlayRendererResources > & pPrepareRendererResources,
const std::shared_ptr< spdlog::logger > & pLogger,
const CesiumGeospatial::Projection & projection,
const CesiumGeometry::Rectangle & coverageRectangle )
noexcept

Creates a new instance.

Deprecated
Use the overload that takes a RasterOverlayExternals instead.

Member Function Documentation

◆ addCredits()

virtual void CesiumRasterOverlays::RasterOverlayTileProvider::addCredits ( CesiumUtility::CreditReferencer & creditReferencer)
virtualnoexcept

Adds this tile provider's credits to a credit referencer.

The added credits will be displayed whenever the RasterOverlay that owns this tile provider is displayed. To show tile-specific credits, add them to LoadedRasterOverlayImage::credits in the instance returned by loadTileImage.

Parameters
creditReferencerThe credit referencer to which to add credits.

◆ getCredit()

const std::optional< CesiumUtility::Credit > & CesiumRasterOverlays::RasterOverlayTileProvider::getCredit ( ) const
noexcept

Get the per-TileProvider CesiumUtility::Credit if one exists.

Deprecated
Implement addCredits instead.

◆ getOwner()

const RasterOverlay & CesiumRasterOverlays::RasterOverlayTileProvider::getOwner ( ) const
noexcept

Returns the RasterOverlay that created this instance.

◆ loadTileImage()

virtual CesiumAsync::Future< LoadedRasterOverlayImage > CesiumRasterOverlays::RasterOverlayTileProvider::loadTileImage ( const RasterOverlayTile & overlayTile)
pure virtual

Loads the image for a tile.

Parameters
overlayTileThe overlay tile for which to load the image.
Returns
A future that resolves to the image or error information.

◆ loadTileImageFromUrl()

CesiumAsync::Future< LoadedRasterOverlayImage > CesiumRasterOverlays::RasterOverlayTileProvider::loadTileImageFromUrl ( const std::string & url,
const std::vector< CesiumAsync::IAssetAccessor::THeader > & headers = {},
LoadTileImageFromUrlOptions && options = {} ) const
protected

Loads an image from a URL and optionally some request headers.

This is a useful helper function for implementing loadTileImage.

Parameters
urlThe URL.
headersThe request headers.
optionsAdditional options for the load process.
Returns
A future that resolves to the image or error information.

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