|
| Tile (TilesetContentLoader *pLoader) noexcept |
| Construct a tile with unknown content and a loader that is used to load the content of this tile. Tile has Unloaded status when initializing with this constructor.
|
|
| Tile (TilesetContentLoader *pLoader, std::unique_ptr< TileExternalContent > &&externalContent) noexcept |
| Construct a tile with an external content and a loader that is associated with this tile. Tile has ContentLoaded status when initializing with this constructor.
|
|
| Tile (TilesetContentLoader *pLoader, TileEmptyContent emptyContent) noexcept |
| Construct a tile with an empty content and a loader that is associated with this tile. Tile has ContentLoaded status when initializing with this constructor.
|
|
| ~Tile () noexcept |
| Default destructor, which clears all resources associated with this tile.
|
|
| Tile (const Tile &rhs)=delete |
| Copy constructor.
|
|
| Tile (Tile &&rhs) noexcept |
| Move constructor.
|
|
Tile & | operator= (const Tile &rhs)=delete |
| Copy constructor.
|
|
Tile & | operator= (Tile &&rhs) noexcept=delete |
| Move assignment operator.
|
|
Tile * | getParent () noexcept |
| Returns the parent of this tile in the tile hierarchy.
|
|
const Tile * | getParent () const noexcept |
| Returns the parent of this tile in the tile hierarchy.
|
|
std::span< Tile > | getChildren () noexcept |
| Returns a view on the children of this tile.
|
|
std::span< const Tile > | getChildren () const noexcept |
| Returns a view on the children of this tile.
|
|
void | clearChildren () noexcept |
| Clears the children of this tile.
|
|
void | createChildTiles (std::vector< Tile > &&children) |
| Assigns the given child tiles to this tile.
|
|
const BoundingVolume & | getBoundingVolume () const noexcept |
| Returns the BoundingVolume of this tile.
|
|
void | setBoundingVolume (const BoundingVolume &value) noexcept |
| Set the BoundingVolume of this tile.
|
|
const std::optional< BoundingVolume > & | getViewerRequestVolume () const noexcept |
| Returns the viewer request volume of this tile.
|
|
void | setViewerRequestVolume (const std::optional< BoundingVolume > &value) noexcept |
| Set the viewer request volume of this tile.
|
|
double | getGeometricError () const noexcept |
| Returns the geometric error of this tile.
|
|
void | setGeometricError (double value) noexcept |
| Set the geometric error of the contents of this tile.
|
|
double | getNonZeroGeometricError () const noexcept |
| Gets the tile's geometric error as if by calling getGeometricError , except that if the error is smaller than CesiumUtility::Math::Epsilon5 the returned geometric error is instead computed as half of the parent tile's (non-zero) geometric error.
|
|
bool | getUnconditionallyRefine () const noexcept |
| Returns whether to unconditionally refine this tile.
|
|
void | setUnconditionallyRefine () noexcept |
| Marks that this tile should be unconditionally refined.
|
|
TileRefine | getRefine () const noexcept |
| The refinement strategy of this tile.
|
|
void | setRefine (TileRefine value) noexcept |
| Set the refinement strategy of this tile.
|
|
const glm::dmat4x4 & | getTransform () const noexcept |
| Gets the transformation matrix for this tile.
|
|
void | setTransform (const glm::dmat4x4 &value) noexcept |
| Set the transformation matrix for this tile.
|
|
const TileID & | getTileID () const noexcept |
| Returns the TileID of this tile.
|
|
void | setTileID (const TileID &id) noexcept |
| Set the TileID of this tile.
|
|
const std::optional< BoundingVolume > & | getContentBoundingVolume () const noexcept |
| Returns the BoundingVolume of the renderable content of this tile.
|
|
void | setContentBoundingVolume (const std::optional< BoundingVolume > &value) noexcept |
| Set the BoundingVolume of the renderable content of this tile.
|
|
int64_t | computeByteSize () const noexcept |
| Determines the number of bytes in this tile's geometry and texture data.
|
|
std::vector< RasterMappedTo3DTile > & | getMappedRasterTiles () noexcept |
| Returns the raster overlay tiles that have been mapped to this tile.
|
|
const std::vector< RasterMappedTo3DTile > & | getMappedRasterTiles () const noexcept |
| Returns the raster overlay tiles that have been mapped to this tile.
|
|
const TileContent & | getContent () const noexcept |
| Get the content of the tile.
|
|
TileContent & | getContent () noexcept |
| Get the content of the tile.
|
|
bool | isRenderable () const noexcept |
| Determines if this tile is currently renderable.
|
|
bool | isRenderContent () const noexcept |
| Determines if this tile has mesh content.
|
|
bool | isExternalContent () const noexcept |
| Determines if this tile has external tileset content.
|
|
bool | isEmptyContent () const noexcept |
| Determines if this tile has empty content.
|
|
TilesetContentLoader * | getLoader () const noexcept |
| get the loader that is used to load the tile content.
|
|
TileLoadState | getState () const noexcept |
| Returns the TileLoadState of this tile.
|
|
bool | needsWorkerThreadLoading () const noexcept |
| Determines if this tile requires worker-thread loading.
|
|
bool | needsMainThreadLoading () const noexcept |
| Determines if this tile requires main-thread loading.
|
|
void | addReference (const char *reason=nullptr) noexcept |
| Adds a reference to this tile. A live reference will keep this tile from being destroyed, and it may also keep the tile's content from unloading.
|
|
void | releaseReference (const char *reason=nullptr) noexcept |
| Removes a reference from this tile. A live reference will keep this tile from being destroyed, and it may also keep the tile's content from unloading.
|
|
int32_t | getReferenceCount () const noexcept |
| Gets the current number of references to this tile.
|
|
bool | hasReferencingContent () const noexcept |
| Determines if this tile's getContent counts as a reference to this tile.
|
|
A tile in a Tileset
.
The tiles of a tileset form a hierarchy, where each tile may contain renderable content, and each tile has an associated bounding volume.
The actual hierarchy is represented with the Tile::getParent
and Tile::getChildren
functions.
The renderable content is provided as a TileContent
from the Tile::getContent
function. The Tile::getGeometricError
function returns the geometric error of the representation of the renderable content of a tile.
The BoundingVolume
is given by the Tile::getBoundingVolume
function. This bounding volume encloses the renderable content of the tile itself, as well as the renderable content of all children, yielding a spatially coherent hierarchy of bounding volumes.
The bounding volume of the content of an individual tile is given by the Tile::getContentBoundingVolume
function.
Definition at line 122 of file Tile.h.
void Cesium3DTilesSelection::Tile::addReference |
( |
const char * | reason = nullptr | ) |
|
|
noexcept |
Adds a reference to this tile. A live reference will keep this tile from being destroyed, and it may also keep the tile's content from unloading.
Use CesiumUtility::IntrusivePointer
to manage references to tiles whenever possible, rather than calling this method directly.
When the first reference is added to this tile, this method will automatically add a reference to the tile's parent tile as well. This is to prevent the parent tile from being destroyed, which would implicitly destroy all of its children as well. Parent tiles should never hold references to child tiles.
A reference is also added to a tile when its content is loading or loaded. Content must finish loading, and then be unloaded, before a Tile is eligible for destruction.
Any additional added references, beyond one per referenced child and one representing this tile's content if it exists, indicate interest not just in the Tile itself but also in the Tile's content.
For example: if a Tile has loaded content (1) as well as four children, and two (2) of its children have a reference count greater than zero, it will have a total reference count of at least 1+2=3. If its reference count is exactly three, this means that the tile's content is not currently needed and may be unloaded when the unused tile cache is full. However, if the reference count is greater than 3, this means that the content is also referenced. Therefore, neither the content nor the tile will be unloaded.
- Parameters
-
reason | An optional explanation for why this reference is being added. This can help debug reference counts when compiled with CESIUM_DEBUG_TILE_UNLOADING . |