4#include "RasterOverlayLoadFailureDetails.h"
6#include <CesiumAsync/AsyncSystem.h>
7#include <CesiumAsync/IAssetAccessor.h>
8#include <CesiumGeospatial/Ellipsoid.h>
9#include <CesiumGltf/Ktx2TranscodeTargets.h>
10#include <CesiumUtility/IntrusivePointer.h>
11#include <CesiumUtility/ReferenceCounted.h>
13#include <nonstd/expected.hpp>
14#include <spdlog/fwd.h>
29class IPrepareRasterOverlayRendererResources;
30class RasterOverlayTileProvider;
40 int32_t maximumSimultaneousTileLoads = 20;
53 int64_t subTileCacheBytes = 16 * 1024 * 1024;
66 int32_t maximumTextureSize = 2048;
76 double maximumScreenSpaceError = 2.0;
100 bool showCreditsOnScreen =
false;
144 const std::string& name,
163 const
std::
string&
getName() const noexcept {
return this->_name; }
172 return this->_options;
178 const std::vector<CesiumUtility::Credit>&
getCredits() const noexcept {
179 return this->_credits;
186 return this->_credits;
201 const std::shared_ptr<CesiumAsync::IAssetAccessor>& pAssetAccessor,
203 CESIUM_DEFAULT_ELLIPSOID)
const;
236 const std::shared_ptr<CesiumAsync::IAssetAccessor>& pAssetAccessor,
237 const std::shared_ptr<CesiumUtility::CreditSystem>& pCreditSystem,
238 const std::shared_ptr<IPrepareRasterOverlayRendererResources>&
239 pPrepareRendererResources,
240 const std::shared_ptr<spdlog::logger>& pLogger,
244 struct DestructionCompleteDetails {
252 std::vector<CesiumUtility::Credit> _credits;
253 std::optional<DestructionCompleteDetails> _destructionCompleteDetails;
A system for managing asynchronous requests and tasks.
A value that will be available in the future, as produced by AsyncSystem.
A promise that can be resolved or rejected by an asynchronous task.
A value that will be available in the future, as produced by AsyncSystem. Unlike Future,...
A quadratic surface defined in Cartesian coordinates.
static const Ellipsoid WGS84
An Ellipsoid instance initialized to the WGS84 standard.
Details on a failure while attempting to load a raster overlay tile.
The base class for a rasterized image that can be draped over a Cesium3DTilesSelection::Tileset....
const std::vector< CesiumUtility::Credit > & getCredits() const noexcept
Gets the credits for this overlay.
CesiumUtility::IntrusivePointer< RasterOverlayTileProvider > createPlaceholder(const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< CesiumAsync::IAssetAccessor > &pAssetAccessor, const CesiumGeospatial::Ellipsoid &ellipsoid=CesiumGeospatial::Ellipsoid::WGS84) const
Create a placeholder tile provider can be used in place of the real one while createTileProvider comp...
const RasterOverlayOptions & getOptions() const noexcept
Gets options for this overlay.
std::vector< CesiumUtility::Credit > & getCredits() noexcept
Gets the credits for this overlay.
CesiumAsync::SharedFuture< void > & getAsyncDestructionCompleteEvent(const CesiumAsync::AsyncSystem &asyncSystem)
A future that resolves when this RasterOverlay has been destroyed (i.e. its destructor has been calle...
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 Futu...
RasterOverlay(const std::string &name, const RasterOverlayOptions &overlayOptions=RasterOverlayOptions())
Creates a new instance.
RasterOverlayOptions & getOptions() noexcept
Gets options for this overlay.
nonstd::expected< CesiumUtility::IntrusivePointer< RasterOverlayTileProvider >, RasterOverlayLoadFailureDetails > CreateTileProviderResult
A result from a call to createTileProvider. This is expected to be an IntrusivePointer to a RasterOve...
const std::string & getName() const noexcept
Gets the name of this overlay.
A smart pointer that calls addReference and releaseReference on the controlled object.
A reference-counted base class, meant to be used with IntrusivePointer.
Classes that support asynchronous operations.
Classes for raster overlays, which allow draping massive 2D textures over a model.
Utility classes for Cesium.
For each possible input transmission format, this struct names the ideal target gpu-compressed pixel ...
Options for loading raster overlays.
std::any rendererOptions
Arbitrary data that will be passed to Cesium3DTilesSelection::IPrepareRendererResources::prepareRaste...
std::function< void(const RasterOverlayLoadFailureDetails &)> loadErrorCallback
A callback function that is invoked when a raster overlay resource fails to load.
CesiumGltf::Ktx2TranscodeTargets ktx2TranscodeTargets
For each possible input transmission format, this struct names the ideal target gpu-compressed pixel ...