cesium-native
0.41.0
|
The result of applying a RasterOverlayTile to geometry. More...
#include <Cesium3DTilesSelection/RasterMappedTo3DTile.h>
Public Types | |
enum class | AttachmentState { Unattached = 0 , TemporarilyAttached = 1 , Attached = 2 } |
The states indicating whether the raster tile is attached to the geometry. More... | |
Public Member Functions | |
RasterMappedTo3DTile (const CesiumUtility::IntrusivePointer< CesiumRasterOverlays::RasterOverlayTile > &pRasterTile, int32_t textureCoordinateIndex) | |
Creates a new instance. More... | |
CesiumRasterOverlays::RasterOverlayTile * | getLoadingTile () noexcept |
Returns a RasterOverlayTile that is currently loading. More... | |
const CesiumRasterOverlays::RasterOverlayTile * | getLoadingTile () const noexcept |
Returns a RasterOverlayTile that is currently loading. More... | |
CesiumRasterOverlays::RasterOverlayTile * | getReadyTile () noexcept |
Returns the RasterOverlayTile that represents the imagery data that is ready to render. More... | |
const CesiumRasterOverlays::RasterOverlayTile * | getReadyTile () const noexcept |
Returns the RasterOverlayTile that represents the imagery data that is ready to render. More... | |
int32_t | getTextureCoordinateID () const noexcept |
Returns an identifier for the texture coordinates of this tile. More... | |
void | setTextureCoordinateID (int32_t textureCoordinateID) noexcept |
Sets the texture coordinate ID. More... | |
const glm::dvec2 & | getTranslation () const noexcept |
Returns the translation that converts between the geometry texture coordinates and the texture coordinates that should be used to sample this raster texture. More... | |
const glm::dvec2 & | getScale () const noexcept |
Returns the scaling that converts between the geometry texture coordinates and the texture coordinates that should be used to sample this raster texture. More... | |
AttachmentState | getState () const noexcept |
Indicates whether this overlay tile is currently attached to its owning geometry tile. More... | |
CesiumRasterOverlays::RasterOverlayTile::MoreDetailAvailable | update (IPrepareRendererResources &prepareRendererResources, Tile &tile) |
Update this tile during the update of its owner. More... | |
bool | isMoreDetailAvailable () const noexcept |
void | detachFromTile (IPrepareRendererResources &prepareRendererResources, Tile &tile) noexcept |
Detach the raster from the given tile. More... | |
bool | loadThrottled () noexcept |
Does a throttled load of the mapped RasterOverlayTile. More... | |
Static Public Member Functions | |
static RasterMappedTo3DTile * | mapOverlayToTile (double maximumScreenSpaceError, CesiumRasterOverlays::RasterOverlayTileProvider &tileProvider, CesiumRasterOverlays::RasterOverlayTileProvider &placeholder, Tile &tile, std::vector< CesiumGeospatial::Projection > &missingProjections, const CesiumGeospatial::Ellipsoid &ellipsoid CESIUM_DEFAULT_ELLIPSOID) |
Creates a maping between a RasterOverlay and a Tile. More... | |
The result of applying a RasterOverlayTile to geometry.
Instances of this class are used by a Tile in order to map imagery data that is given as RasterOverlayTile instances to the 2D region that is covered by the tile geometry.
Definition at line 23 of file RasterMappedTo3DTile.h.
The states indicating whether the raster tile is attached to the geometry.
Definition at line 29 of file RasterMappedTo3DTile.h.
Cesium3DTilesSelection::RasterMappedTo3DTile::RasterMappedTo3DTile | ( | const CesiumUtility::IntrusivePointer< CesiumRasterOverlays::RasterOverlayTile > & | pRasterTile, |
int32_t | textureCoordinateIndex | ||
) |
Creates a new instance.
pRasterTile | The RasterOverlayTile that is mapped to the geometry. |
textureCoordinateIndex | The index of the texture coordinates to use with this mapped raster overlay. |
|
noexcept |
Detach the raster from the given tile.
prepareRendererResources | The IPrepareRendererResources used to detach raster overlay from the tile geometry |
tile | The owner tile. |
|
inlinenoexcept |
Returns a RasterOverlayTile that is currently loading.
The caller has to check the exact state of this tile, using Tile::getState.
nullptr
. Definition at line 74 of file RasterMappedTo3DTile.h.
|
inlinenoexcept |
Returns a RasterOverlayTile that is currently loading.
The caller has to check the exact state of this tile, using Tile::getState.
nullptr
. Definition at line 68 of file RasterMappedTo3DTile.h.
|
inlinenoexcept |
Returns the RasterOverlayTile that represents the imagery data that is ready to render.
This will be nullptr
when the tile data has not yet been loaded.
nullptr
. Definition at line 91 of file RasterMappedTo3DTile.h.
|
inlinenoexcept |
Returns the RasterOverlayTile that represents the imagery data that is ready to render.
This will be nullptr
when the tile data has not yet been loaded.
nullptr
. Definition at line 86 of file RasterMappedTo3DTile.h.
|
inlinenoexcept |
Returns the scaling that converts between the geometry texture coordinates and the texture coordinates that should be used to sample this raster texture.
Definition at line 140 of file RasterMappedTo3DTile.h.
|
inlinenoexcept |
Indicates whether this overlay tile is currently attached to its owning geometry tile.
When a raster overlay tile is attached to a geometry tile, IPrepareRendererResources::attachRasterInMainThread is invoked. When it is detached, IPrepareRendererResources::detachRasterInMainThread is invoked.
Definition at line 151 of file RasterMappedTo3DTile.h.
|
inlinenoexcept |
Returns an identifier for the texture coordinates of this tile.
The texture coordinates for this raster are found in the glTF as an attribute named _CESIUMOVERLAY_n
where n
is this value.
Definition at line 103 of file RasterMappedTo3DTile.h.
|
inlinenoexcept |
Returns the translation that converts between the geometry texture coordinates and the texture coordinates that should be used to sample this raster texture.
rasterCoordinates = geometryCoordinates * scale + translation
Definition at line 127 of file RasterMappedTo3DTile.h.
|
noexcept |
Does a throttled load of the mapped RasterOverlayTile.
|
static |
Creates a maping between a RasterOverlay and a Tile.
The returned mapping will be to a placeholder RasterOverlayTile if the overlay's tile provider is not yet ready (i.e. it's still a placeholder) or if the overlap between the tile and the raster overlay cannot yet be determined because the projected rectangle of the tile is not yet known.
Returns a pointer to the created RasterMappedTo3DTile
in the Tile's Tile::getMappedRasterTiles collection. Note that this pointer may become invalid as soon as another item is added to or removed from this collection.
maximumScreenSpaceError | The maximum screen space error that is used for the current tile |
tileProvider | The overlay tile provider to map to the tile. This may be a placeholder if the tile provider is not yet ready. |
placeholder | The placeholder tile provider for this overlay. This is always a placeholder, even if the tile provider is already ready. |
tile | The tile to which to map the overlay. |
missingProjections | The list of projections for which there are not yet any texture coordiantes. On return, the given overlay's Projection may be added to this collection if the Tile does not yet have texture coordinates for the Projection and the Projection is not already in the collection. |
|
inlinenoexcept |
Sets the texture coordinate ID.
textureCoordinateID | The ID. |
Definition at line 114 of file RasterMappedTo3DTile.h.
CesiumRasterOverlays::RasterOverlayTile::MoreDetailAvailable Cesium3DTilesSelection::RasterMappedTo3DTile::update | ( | IPrepareRendererResources & | prepareRendererResources, |
Tile & | tile | ||
) |
Update this tile during the update of its owner.
This is only supposed to be called by Tile::update. It will return whether there is a more detailed version of the raster data available.
prepareRendererResources | The IPrepareRendererResources used to create render resources for raster overlay |
tile | The owner tile. |