3#include <CesiumAsync/AsyncSystem.h>
4#include <CesiumAsync/IAssetAccessor.h>
5#include <CesiumAsync/SharedAssetDepot.h>
6#include <CesiumGeometry/QuadtreeTileID.h>
7#include <CesiumGeometry/QuadtreeTilingScheme.h>
8#include <CesiumRasterOverlays/IPrepareRasterOverlayRendererResources.h>
9#include <CesiumRasterOverlays/Library.h>
10#include <CesiumRasterOverlays/RasterOverlayTileProvider.h>
11#include <CesiumUtility/CreditSystem.h>
12#include <CesiumUtility/Result.h>
13#include <CesiumUtility/SharedAsset.h>
56 uint32_t minimumLevel,
57 uint32_t maximumLevel,
59 uint32_t imageHeight)
noexcept;
74 uint32_t
getWidth() const noexcept {
return this->_imageWidth; }
79 uint32_t
getHeight() const noexcept {
return this->_imageHeight; }
86 return this->_tilingScheme;
100 const glm::dvec2& screenPixels);
117 struct LoadedQuadtreeImage
120 const std::shared_ptr<LoadedRasterOverlayImage>& pLoaded_,
121 const std::optional<CesiumGeometry::Rectangle>& subset_)
122 : pLoaded(pLoaded_), subset(subset_) {}
123 std::shared_ptr<LoadedRasterOverlayImage> pLoaded =
nullptr;
124 std::optional<CesiumGeometry::Rectangle> subset = std::nullopt;
126 int64_t getSizeBytes()
const {
128 accum += int64_t(
sizeof(LoadedQuadtreeImage));
130 accum += pLoaded->getSizeBytes();
151 mapRasterTilesToGeometryTile(
153 const glm::dvec2 targetScreenPixels);
155 struct CombinedImageMeasurements {
158 int32_t heightPixels;
160 int32_t bytesPerChannel;
163 static CombinedImageMeasurements measureCombinedImage(
168 static LoadedRasterOverlayImage combineImages(
173 uint32_t _minimumLevel;
174 uint32_t _maximumLevel;
175 uint32_t _imageWidth;
176 uint32_t _imageHeight;
A value that will be available in the future, as produced by AsyncSystem.
A depot for CesiumUtility::SharedAsset instances, which are potentially shared between multiple objec...
A value that will be available in the future, as produced by AsyncSystem. Unlike Future,...
Defines how a rectangular region is divided into quadtree tiles.
uint32_t getHeight() const noexcept
Returns the image height of this instance, in pixels.
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 wh...
uint32_t getMinimumLevel() const noexcept
Returns the minimum tile level of this instance.
QuadtreeRasterOverlayTileProvider(const CesiumUtility::IntrusivePointer< const RasterOverlay > &pCreator, const CreateRasterOverlayTileProviderParameters ¶meters, 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.
uint32_t getWidth() const noexcept
Returns the image width of this instance, in pixels.
virtual CesiumAsync::Future< LoadedRasterOverlayImage > loadQuadtreeTileImage(const CesiumGeometry::QuadtreeTileID &tileID) const =0
Asynchronously loads a tile in the quadtree.
uint32_t getMaximumLevel() const noexcept
Returns the maximum tile level of this instance.
const CesiumGeometry::QuadtreeTilingScheme & getTilingScheme() const noexcept
Returns the CesiumGeometry::QuadtreeTilingScheme of this instance.
RasterOverlayTileProvider(const CesiumUtility::IntrusivePointer< const RasterOverlay > &pCreator, const CreateRasterOverlayTileProviderParameters ¶meters, const CesiumGeospatial::Projection &projection, const CesiumGeometry::Rectangle &coverageRectangle) noexcept
Creates a new instance.
Raster image data for a tile in a quadtree.
A smart pointer that calls addReference and releaseReference on the controlled object.
An asset that is potentially shared between multiple objects, such as an image shared between multipl...
std::variant< GeographicProjection, WebMercatorProjection > Projection
A projection.
Classes for raster overlays, which allow draping massive 2D textures over a model.
Result< IntrusivePointer< T > > ResultPointer
A convenient shortcut for CesiumUtility::Result<CesiumUtility::IntrusivePointer<T>>.
Uniquely identifies a node in a quadtree.
Parameters passed to RasterOverlay::createTileProvider.