|
cesium-native 0.52.0
|
Raster image data for a tile in a quadtree. More...
#include <CesiumRasterOverlays/RasterOverlayTile.h>
Public Types | |
| enum class | LoadState { Placeholder = -2 , Failed = -1 , Unloaded = 0 , Loading = 1 , Loaded = 2 , Done = 3 } |
| Lifecycle states of a raster overlay tile. More... | |
| enum class | MoreDetailAvailable { No = 0 , Yes = 1 , Unknown = 2 } |
| Tile availability states. More... | |
Public Member Functions | |
| RasterOverlayTile (ActivatedRasterOverlay &activatedOverlay) noexcept | |
| Constructs a placeholder tile for the tile provider. | |
| RasterOverlayTile (ActivatedRasterOverlay &activatedOverlay, const glm::dvec2 &targetScreenPixels, const CesiumGeometry::Rectangle &imageryRectangle) noexcept | |
| Creates a new instance. | |
| ~RasterOverlayTile () | |
| Default destructor. | |
| ActivatedRasterOverlay & | getActivatedOverlay () noexcept |
| Gets the activated overlay that created this instance. | |
| const ActivatedRasterOverlay & | getActivatedOverlay () const noexcept |
| Gets the activated overlay that created this instance. | |
| RasterOverlayTileProvider & | getTileProvider () noexcept |
Returns the RasterOverlayTileProvider that is responsible for loading this tile's image. | |
| const RasterOverlayTileProvider & | getTileProvider () const noexcept |
Returns the RasterOverlayTileProvider that is responsible for loading this tile's image. | |
| const RasterOverlay & | getOverlay () const noexcept |
Gets the RasterOverlay associated with this instance. | |
| const CesiumGeometry::Rectangle & | getRectangle () const noexcept |
Returns the CesiumGeometry::Rectangle that defines the bounds of this tile in the raster overlay's projected coordinates. | |
| glm::dvec2 | getTargetScreenPixels () const noexcept |
| Gets the number of screen pixels in each direction that should be covered by this tile's texture. | |
| LoadState | getState () const noexcept |
Returns the current LoadState. | |
| const std::vector< CesiumUtility::Credit > & | getCredits () const noexcept |
| Returns the list of Credits needed for this tile. | |
| CesiumUtility::IntrusivePointer< const CesiumGltf::ImageAsset > | getImage () const noexcept |
| Returns the image data for the tile. | |
| CesiumUtility::IntrusivePointer< CesiumGltf::ImageAsset > | getImage () noexcept |
| Returns the image data for the tile. | |
| void | loadInMainThread () |
| Create the renderer resources for the loaded image. | |
| void * | getRendererResources () const noexcept |
| Returns the renderer resources that have been created for this tile. | |
| void | setRendererResources (void *pValue) noexcept |
| Set the renderer resources for this tile. | |
| MoreDetailAvailable | isMoreDetailAvailable () const noexcept |
| Determines if more detailed data is available for the spatial area covered by this tile. | |
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. | |
Friends | |
| class | ActivatedRasterOverlay |
Raster image data for a tile in a quadtree.
Instances of this clas represent tiles of a quadtree that have an associated image, which us used as an imagery overlay for tile geometry. The connection between the imagery data and the actual tile geometry is established via the Cesium3DTilesSelection::RasterMappedTo3DTile class, which combines a raster overlay tile with texture coordinates, to map the image on the geometry of a Cesium3DTilesSelection::Tile.
Definition at line 33 of file RasterOverlayTile.h.
|
strong |
Lifecycle states of a raster overlay tile.
Definition at line 39 of file RasterOverlayTile.h.
|
strong |
Tile availability states.
Values of this enumeration are returned by Cesium3DTilesSelection::RasterMappedTo3DTile::update, which in turn is called by TilesetContentManager::updateDoneState. These values are used to determine whether a leaf tile has been reached, but the associated raster tiles are not yet the most detailed ones that are available.
| Enumerator | |
|---|---|
| No | There are no more detailed raster tiles. |
| Yes | There are more detailed raster tiles. |
| Unknown | It is not known whether more detailed raster tiles are available. |
Definition at line 80 of file RasterOverlayTile.h.
|
noexcept |
Constructs a placeholder tile for the tile provider.
The getState of this instance will always be LoadState::Placeholder.
| activatedOverlay | The ActivatedRasterOverlay. This object must remain valid for the entire lifetime of the tile. If the activated overlay is destroyed before the tile, undefined behavior will result. |
|
noexcept |
Creates a new instance.
The tile will start in the Unloaded state, and will not begin loading until ActivatedRasterOverlay::loadTile or ActivatedRasterOverlay::loadTileThrottled is called.
| activatedOverlay | The ActivatedRasterOverlay. This object must remain valid for the entire lifetime of the tile. If the activated overlay is destroyed before the tile, undefined behavior will result. |
| targetScreenPixels | The maximum number of pixels on the screen that this tile is meant to cover. The overlay image should be approximately this many pixels divided by the RasterOverlayOptions::maximumScreenSpaceError in order to achieve the desired level-of-detail, but it does not need to be exactly this size. |
| imageryRectangle | The rectangle that the returned image must cover. It is allowed to cover a slightly larger rectangle in order to maintain pixel alignment. It may also cover a smaller rectangle when the overlay itself does not cover the entire rectangle. |
|
noexcept |
Gets the activated overlay that created this instance.
|
inlinenoexcept |
Returns the list of Credits needed for this tile.
Definition at line 183 of file RasterOverlayTile.h.
|
inlinenoexcept |
Returns the image data for the tile.
This will only contain valid image data if the getState of this tile is or Loaded.Done
Definition at line 196 of file RasterOverlayTile.h.
|
inlinenoexcept |
Returns the image data for the tile.
This will only contain valid image data if the getState of this tile is or Loaded.Done
Definition at line 208 of file RasterOverlayTile.h.
|
inlinenoexcept |
Returns the CesiumGeometry::Rectangle that defines the bounds of this tile in the raster overlay's projected coordinates.
Definition at line 159 of file RasterOverlayTile.h.
|
inlinenoexcept |
Returns the renderer resources that have been created for this tile.
Definition at line 226 of file RasterOverlayTile.h.
|
inlinenoexcept |
Returns the current LoadState.
Definition at line 177 of file RasterOverlayTile.h.
|
inlinenoexcept |
Gets the number of screen pixels in each direction that should be covered by this tile's texture.
This is used to control which content (how highly detailed) the RasterOverlayTileProvider uses within the bounds of this tile.
Definition at line 170 of file RasterOverlayTile.h.
|
noexcept |
Returns the RasterOverlayTileProvider that is responsible for loading this tile's image.
|
inlinenoexcept |
Determines if more detailed data is available for the spatial area covered by this tile.
Definition at line 243 of file RasterOverlayTile.h.
| void CesiumRasterOverlays::RasterOverlayTile::loadInMainThread | ( | ) |
Create the renderer resources for the loaded image.
If the getState of this tile is not , then nothing will be done. Otherwise, the renderer resources will be prepared, so that they may later be obtained with LoadedgetRendererResources, and the getState of this tile will change to . Done
|
inlinenoexcept |
Set the renderer resources for this tile.
This function is not supposed to be called by clients.
Definition at line 235 of file RasterOverlayTile.h.
|
friend |
Definition at line 257 of file RasterOverlayTile.h.