cesium-native  0.41.0
CesiumRasterOverlays::IPrepareRasterOverlayRendererResources Class Referenceabstract
Inheritance diagram for CesiumRasterOverlays::IPrepareRasterOverlayRendererResources:
Cesium3DTilesSelection::IPrepareRendererResources

Public Member Functions

virtual void * prepareRasterInLoadThread (CesiumGltf::ImageAsset &image, const std::any &rendererOptions)=0
 Prepares a raster overlay tile. More...
 
virtual void * prepareRasterInMainThread (RasterOverlayTile &rasterTile, void *pLoadThreadResult)=0
 Further preprares a raster overlay tile. More...
 
virtual void freeRaster (const RasterOverlayTile &rasterTile, void *pLoadThreadResult, void *pMainThreadResult) noexcept=0
 Frees previously-prepared renderer resources for a raster tile. More...
 

Detailed Description

Definition at line 17 of file IPrepareRasterOverlayRendererResources.h.

Member Function Documentation

◆ freeRaster()

virtual void CesiumRasterOverlays::IPrepareRasterOverlayRendererResources::freeRaster ( const RasterOverlayTile rasterTile,
void *  pLoadThreadResult,
void *  pMainThreadResult 
)
pure virtualnoexcept

Frees previously-prepared renderer resources for a raster tile.

This method is always called from the thread that destroyed the RasterOverlayTile. When raster overlays are used with tilesets, this is the thread that called Tileset::updateView or deleted the tileset.

Parameters
rasterTileThe tile for which to free renderer resources.
pLoadThreadResultThe result returned by prepareRasterInLoadThread. If prepareRasterInMainThread has already been called, this parameter will be nullptr.
pMainThreadResultThe result returned by prepareRasterInMainThread. If prepareRasterInMainThread has not yet been called, this parameter will be nullptr.

◆ prepareRasterInLoadThread()

virtual void* CesiumRasterOverlays::IPrepareRasterOverlayRendererResources::prepareRasterInLoadThread ( CesiumGltf::ImageAsset image,
const std::any &  rendererOptions 
)
pure virtual

Prepares a raster overlay tile.

This method is invoked in the load thread and may modify the image.

Parameters
imageThe raster tile image to prepare.
rendererOptionsRenderer options associated with the raster overlay tile from RasterOverlayOptions::rendererOptions.
Returns
Arbitrary data representing the result of the load process. This data is passed to prepareRasterInMainThread as the pLoadThreadResult parameter.

◆ prepareRasterInMainThread()

virtual void* CesiumRasterOverlays::IPrepareRasterOverlayRendererResources::prepareRasterInMainThread ( RasterOverlayTile rasterTile,
void *  pLoadThreadResult 
)
pure virtual

Further preprares a raster overlay tile.

This is called after prepareRasterInLoadThread, and unlike that method, this one is called from the same thread that called Tileset::updateView.

Parameters
rasterTileThe raster tile to prepare.
pLoadThreadResultThe value returned from prepareRasterInLoadThread.
Returns
Arbitrary data representing the result of the load process. Note that the value returned by prepareRasterInLoadThread will not be automatically preserved and passed to free. If you need to free that value, do it in this method before returning. If you need that value later, add it to the object returned from this method.

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