cesium-native 0.64.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 > &pCreator, const CreateRasterOverlayTileProviderParameters &parameters, 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.
 
RasterOverlay & getOwner () noexcept
 Returns the RasterOverlay that created this instance.
 
const RasterOverlay & getOwner () const noexcept
 Returns the RasterOverlay that created this instance.
 
const RasterOverlayExternals & getExternals () 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::AsyncSystem & getAsyncSystem () 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::Projection & getProjection () const noexcept
 Returns the CesiumGeospatial::Projection of this instance.
 
const CesiumGeometry::Rectangle & getCoverageRectangle () const noexcept
 Returns the coverage CesiumGeometry::Rectangle of this instance.
 
const CesiumUtility::CreditSource & getCreditSource () const noexcept
 Gets the CesiumUtility::CreditSource that identifies this raster overlay's credits with the CesiumUtility::CreditSystem.
 
std::vector< CesiumUtility::Credit > & getCredits () noexcept
 Gets the collection of credits that should be shown whenever this tile provider is shown.
 
const std::vector< CesiumUtility::Credit > & getCredits () const noexcept
 Gets the collection of credits that should be shown whenever this tile provider is shown.
 
virtual CesiumAsync::Future< LoadedRasterOverlayImage > loadTileImage (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.
 
virtual void tick ()
 Called on a regular basis, such as once per frame. This can be implemented to perform operations such as polling that can't be easily handled with a Future.
 
- 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< LoadedRasterOverlayImage > loadTileImageFromUrl (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 140 of file RasterOverlayTileProvider.h.

Constructor & Destructor Documentation

◆ RasterOverlayTileProvider()

CesiumRasterOverlays::RasterOverlayTileProvider::RasterOverlayTileProvider ( const CesiumUtility::IntrusivePointer< const RasterOverlay > & pCreator,
const CreateRasterOverlayTileProviderParameters & parameters,
const CesiumGeospatial::Projection & projection,
const CesiumGeometry::Rectangle & coverageRectangle )
noexcept

Creates a new instance.

Parameters
pCreatorThe RasterOverlay that directly created this instance. This will become the owner of this instance if another owner is not specified in CreateRasterOverlayTileProviderParameters::pOwner.
parametersThe parameters for creating the tile provider.
projectionThe CesiumGeospatial::Projection.
coverageRectangleThe rectangle that bounds all the area covered by this overlay, expressed in projected coordinates.

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.

◆ getCredits() [1/2]

const std::vector< CesiumUtility::Credit > & CesiumRasterOverlays::RasterOverlayTileProvider::getCredits ( ) const
noexcept

Gets the collection of credits that should be shown whenever this tile provider is shown.

If called on a non-const instance, the returned collection may be modified to add or remove credits.

The credits in this collection will be added to the CesiumUtility::CreditReferencer in addCredits.

◆ getCredits() [2/2]

std::vector< CesiumUtility::Credit > & CesiumRasterOverlays::RasterOverlayTileProvider::getCredits ( )
noexcept

Gets the collection of credits that should be shown whenever this tile provider is shown.

If called on a non-const instance, the returned collection may be modified to add or remove credits.

The credits in this collection will be added to the CesiumUtility::CreditReferencer in addCredits.

◆ 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.

◆ tick()

virtual void CesiumRasterOverlays::RasterOverlayTileProvider::tick ( )
inlinevirtual

Called on a regular basis, such as once per frame. This can be implemented to perform operations such as polling that can't be easily handled with a Future.

Definition at line 275 of file RasterOverlayTileProvider.h.


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