cesium-native 0.43.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 (RasterOverlayTileProvider &tileProvider) noexcept | |
Constructs a placeholder tile for the tile provider. | |
RasterOverlayTile (RasterOverlayTileProvider &tileProvider, const glm::dvec2 &targetScreenPixels, const CesiumGeometry::Rectangle &imageryRectangle) noexcept | |
Creates a new instance. | |
~RasterOverlayTile () | |
Default destructor. | |
RasterOverlayTileProvider & | getTileProvider () noexcept |
Returns the RasterOverlayTileProvider that created this instance. | |
const RasterOverlayTileProvider & | getTileProvider () const noexcept |
Returns the RasterOverlayTileProvider that created this instance. | |
RasterOverlay & | getOverlay () noexcept |
Returns the RasterOverlay that created this instance. | |
const RasterOverlay & | getOverlay () const noexcept |
Returns the RasterOverlay that created 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, 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. | |
Friends | |
class | RasterOverlayTileProvider |
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 32 of file RasterOverlayTile.h.
|
strong |
Lifecycle states of a raster overlay tile.
Definition at line 38 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 79 of file RasterOverlayTile.h.
|
noexcept |
Constructs a placeholder tile for the tile provider.
The getState
of this instance will always be LoadState::Placeholder
.
tileProvider | The RasterOverlayTileProvider . This object must remain valid for the entire lifetime of the tile. If the tile provider 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 RasterOverlayTileProvider::loadTile
or RasterOverlayTileProvider::loadTileThrottled
is called.
tileProvider | The RasterOverlayTileProvider . This object must remain valid for the entire lifetime of the tile. If the tile provider is destroyed before the tile, undefined behavior may 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. |
|
inlinenoexcept |
Returns the list of Credits needed for this tile.
Definition at line 184 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 197 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 209 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 160 of file RasterOverlayTile.h.
|
inlinenoexcept |
Returns the renderer resources that have been created for this tile.
Definition at line 227 of file RasterOverlayTile.h.
|
inlinenoexcept |
Returns the current LoadState
.
Definition at line 178 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 171 of file RasterOverlayTile.h.
|
inlinenoexcept |
Returns the RasterOverlayTileProvider
that created this instance.
Definition at line 142 of file RasterOverlayTile.h.
|
inlinenoexcept |
Returns the RasterOverlayTileProvider
that created this instance.
Definition at line 135 of file RasterOverlayTile.h.
|
inlinenoexcept |
Determines if more detailed data is available for the spatial area covered by this tile.
Definition at line 244 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 Loaded
getRendererResources
, 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 236 of file RasterOverlayTile.h.
|
friend |
Definition at line 249 of file RasterOverlayTile.h.