cesium-native  0.41.0
CesiumRasterOverlays::QuadtreeRasterOverlayTileProvider Class Referenceabstract
Inheritance diagram for CesiumRasterOverlays::QuadtreeRasterOverlayTileProvider:
CesiumRasterOverlays::RasterOverlayTileProvider CesiumUtility::ReferenceCounted< T, isThreadSafe > CesiumUtility::ThreadIdHolder< true >

Public Member Functions

 QuadtreeRasterOverlayTileProvider (const CesiumUtility::IntrusivePointer< const RasterOverlay > &pOwner, const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< CesiumAsync::IAssetAccessor > &pAssetAccessor, std::optional< CesiumUtility::Credit > credit, const std::shared_ptr< IPrepareRasterOverlayRendererResources > &pPrepareRendererResources, const std::shared_ptr< spdlog::logger > &pLogger, const CesiumGeospatial::Projection &projection, const CesiumGeometry::QuadtreeTilingScheme &tilingScheme, const CesiumGeometry::Rectangle &coverageRectangle, uint32_t minimumLevel, uint32_t maximumLevel, uint32_t imageWidth, uint32_t imageHeight) noexcept
 Creates a new instance. More...
 
uint32_t getMinimumLevel () const noexcept
 Returns the minimum tile level of this instance.
 
uint32_t getMaximumLevel () const noexcept
 Returns the maximum tile level of this instance.
 
uint32_t getWidth () const noexcept
 Returns the image width of this instance, in pixels.
 
uint32_t getHeight () const noexcept
 Returns the image height of this instance, in pixels.
 
const CesiumGeometry::QuadtreeTilingSchemegetTilingScheme () const noexcept
 Returns the CesiumGeometry::QuadtreeTilingScheme of this instance.
 
uint32_t computeLevelFromTargetScreenPixels (const CesiumGeometry::Rectangle &rectangle, const glm::dvec2 &screenPixels)
 Computes the best quadtree level to use for an image intended to cover a given projected rectangle when it is a given size on the screen. More...
 
- Public Member Functions inherited from CesiumRasterOverlays::RasterOverlayTileProvider
 RasterOverlayTileProvider (const CesiumUtility::IntrusivePointer< const RasterOverlay > &pOwner, const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< CesiumAsync::IAssetAccessor > &pAssetAccessor, const CesiumGeospatial::Ellipsoid &ellipsoid CESIUM_DEFAULT_ELLIPSOID) noexcept
 
 RasterOverlayTileProvider (const CesiumUtility::IntrusivePointer< const RasterOverlay > &pOwner, const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< CesiumAsync::IAssetAccessor > &pAssetAccessor, 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. More...
 
virtual ~RasterOverlayTileProvider () noexcept
 Default destructor.
 
bool isPlaceholder () const noexcept
 Returns whether this is a placeholder. More...
 
RasterOverlaygetOwner () noexcept
 Returns the RasterOverlay that created this instance.
 
const RasterOverlaygetOwner () const noexcept
 Returns the RasterOverlay that created this instance. More...
 
const std::shared_ptr< CesiumAsync::IAssetAccessor > & getAssetAccessor () const noexcept
 Get the system to use for asychronous requests and threaded work.
 
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.
 
CesiumUtility::IntrusivePointer< RasterOverlayTilegetTile (const CesiumGeometry::Rectangle &rectangle, const glm::dvec2 &targetScreenPixels)
 Returns a new RasterOverlayTile with the given specifications. More...
 
int64_t getTileDataBytes () const noexcept
 Gets the number of bytes of tile data that are currently loaded.
 
uint32_t getNumberOfTilesLoading () const noexcept
 Returns the number of tiles that are currently loading.
 
void removeTile (RasterOverlayTile *pTile) noexcept
 Removes a no-longer-referenced tile from this provider's cache and deletes it. More...
 
const std::optional< CesiumUtility::Credit > & getCredit () const noexcept
 Get the per-TileProvider Credit if one exists.
 
CesiumAsync::Future< TileProviderAndTileloadTile (RasterOverlayTile &tile)
 Loads a tile immediately, without throttling requests. More...
 
bool loadTileThrottled (RasterOverlayTile &tile)
 Loads a tile, unless there are too many tile loads already in progress. 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.
 

Protected Member Functions

virtual CesiumAsync::Future< LoadedRasterOverlayImageloadQuadtreeTileImage (const CesiumGeometry::QuadtreeTileID &tileID) const =0
 Asynchronously loads a tile in the quadtree. More...
 
- Protected Member Functions inherited from CesiumRasterOverlays::RasterOverlayTileProvider
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. More...
 

Detailed Description

Definition at line 19 of file QuadtreeRasterOverlayTileProvider.h.

Constructor & Destructor Documentation

◆ QuadtreeRasterOverlayTileProvider()

CesiumRasterOverlays::QuadtreeRasterOverlayTileProvider::QuadtreeRasterOverlayTileProvider ( const CesiumUtility::IntrusivePointer< const RasterOverlay > &  pOwner,
const CesiumAsync::AsyncSystem asyncSystem,
const std::shared_ptr< CesiumAsync::IAssetAccessor > &  pAssetAccessor,
std::optional< CesiumUtility::Credit credit,
const std::shared_ptr< IPrepareRasterOverlayRendererResources > &  pPrepareRendererResources,
const std::shared_ptr< spdlog::logger > &  pLogger,
const CesiumGeospatial::Projection projection,
const CesiumGeometry::QuadtreeTilingScheme tilingScheme,
const CesiumGeometry::Rectangle coverageRectangle,
uint32_t  minimumLevel,
uint32_t  maximumLevel,
uint32_t  imageWidth,
uint32_t  imageHeight 
)
noexcept

Creates a new instance.

Parameters
pOwnerThe raster overlay that created this tile provider.
asyncSystemThe async system used to do work in threads.
pAssetAccessorThe interface used to obtain assets (tiles, etc.) for this raster overlay.
creditThe Credit for this tile provider, if it exists.
pPrepareRendererResourcesThe interface used to prepare raster images for rendering.
pLoggerThe logger to which to send messages about the tile provider and tiles.
projectionThe CesiumGeospatial::Projection.
coverageRectangleThe CesiumGeometry::Rectangle.
minimumLevelThe minimum quadtree tile level.
maximumLevelThe maximum quadtree tile level.
imageWidthThe image width.
imageHeightThe image height.

Member Function Documentation

◆ computeLevelFromTargetScreenPixels()

uint32_t CesiumRasterOverlays::QuadtreeRasterOverlayTileProvider::computeLevelFromTargetScreenPixels ( const CesiumGeometry::Rectangle rectangle,
const glm::dvec2 &  screenPixels 
)

Computes the best quadtree level to use for an image intended to cover a given projected rectangle when it is a given size on the screen.

Parameters
rectangleThe range of projected coordinates to cover.
screenPixelsThe number of screen pixels to be covered by the rectangle.
Returns
The level.

◆ loadQuadtreeTileImage()

virtual CesiumAsync::Future<LoadedRasterOverlayImage> CesiumRasterOverlays::QuadtreeRasterOverlayTileProvider::loadQuadtreeTileImage ( const CesiumGeometry::QuadtreeTileID tileID) const
protectedpure virtual

Asynchronously loads a tile in the quadtree.

Parameters
tileIDThe ID of the quadtree tile to load.
Returns
A Future that resolves to the loaded image data or error information.

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