cesium-native 0.43.0
|
Supports querying and modifying the various types of availablity information included in a Cesium3DTiles::Subtree
.
More...
#include <Cesium3DTilesContent/SubtreeAvailability.h>
Classes | |
struct | SubtreeBufferViewAvailability |
An AvailabilityView that accesses availability information from a bitstream. More... | |
struct | SubtreeConstantAvailability |
An AvailibilityView that indicates that either all tiles are available or all tiles are unavailable. More... | |
Public Types | |
using | AvailabilityView |
A mechanism for accessing availability information. It may be a constant value, or it may be read from a bitstream. | |
Public Member Functions | |
SubtreeAvailability (ImplicitTileSubdivisionScheme subdivisionScheme, uint32_t levelsInSubtree, AvailabilityView tileAvailability, AvailabilityView subtreeAvailability, std::vector< AvailabilityView > &&contentAvailability, Cesium3DTiles::Subtree &&subtree) | |
Constructs a new instance. | |
bool | isTileAvailable (const CesiumGeometry::QuadtreeTileID &subtreeId, const CesiumGeometry::QuadtreeTileID &tileId) const noexcept |
Determines if a given tile in the quadtree is available. | |
bool | isTileAvailable (const CesiumGeometry::OctreeTileID &subtreeId, const CesiumGeometry::OctreeTileID &tileId) const noexcept |
Determines if a given tile in the octree is available. | |
bool | isTileAvailable (uint32_t relativeTileLevel, uint64_t relativeTileMortonId) const noexcept |
Determines if a given tile in the subtree is available. | |
void | setTileAvailable (const CesiumGeometry::QuadtreeTileID &subtreeId, const CesiumGeometry::QuadtreeTileID &tileId, bool isAvailable) noexcept |
Sets the availability state of a given tile in the quadtree. | |
void | setTileAvailable (const CesiumGeometry::OctreeTileID &subtreeId, const CesiumGeometry::OctreeTileID &tileId, bool isAvailable) noexcept |
Sets the availability state of a given tile in the octree. | |
void | setTileAvailable (uint32_t relativeTileLevel, uint64_t relativeTileMortonId, bool isAvailable) noexcept |
Sets the availability state of a given tile in the subtree. | |
bool | isContentAvailable (const CesiumGeometry::QuadtreeTileID &subtreeId, const CesiumGeometry::QuadtreeTileID &tileId, uint64_t contentId) const noexcept |
Determines if content for a given tile in the quadtree is available. | |
bool | isContentAvailable (const CesiumGeometry::OctreeTileID &subtreeId, const CesiumGeometry::OctreeTileID &tileId, uint64_t contentId) const noexcept |
Determines if content for a given tile in the octree is available. | |
bool | isContentAvailable (uint32_t relativeTileLevel, uint64_t relativeTileMortonId, uint64_t contentId) const noexcept |
Determines if content for a given tile in the subtree is available. | |
void | setContentAvailable (const CesiumGeometry::QuadtreeTileID &subtreeId, const CesiumGeometry::QuadtreeTileID &tileId, uint64_t contentId, bool isAvailable) noexcept |
Sets the availability state of the content for a given tile in the quadtree. | |
void | setContentAvailable (const CesiumGeometry::OctreeTileID &subtreeId, const CesiumGeometry::OctreeTileID &tileId, uint64_t contentId, bool isAvailable) noexcept |
Sets the availability state of the content for a given tile in the octree. | |
void | setContentAvailable (uint32_t relativeTileLevel, uint64_t relativeTileMortonId, uint64_t contentId, bool isAvailable) noexcept |
Sets the availability state of the content for a given tile in the subtree. | |
bool | isSubtreeAvailable (const CesiumGeometry::QuadtreeTileID &thisSubtreeID, const CesiumGeometry::QuadtreeTileID &checkSubtreeID) const noexcept |
Determines if the subtree rooted at the given tile is available. | |
bool | isSubtreeAvailable (const CesiumGeometry::OctreeTileID &thisSubtreeID, const CesiumGeometry::OctreeTileID &checkSubtreeID) const noexcept |
Determines if the subtree rooted at the given tile is available. | |
bool | isSubtreeAvailable (uint64_t relativeSubtreeMortonId) const noexcept |
Determines if the subtree rooted at the given tile is available. | |
void | setSubtreeAvailable (const CesiumGeometry::QuadtreeTileID &thisSubtreeID, const CesiumGeometry::QuadtreeTileID &setSubtreeID, bool isAvailable) noexcept |
Sets the availability state of the child quadtree rooted at the given tile. | |
void | setSubtreeAvailable (const CesiumGeometry::OctreeTileID &thisSubtreeID, const CesiumGeometry::OctreeTileID &setSubtreeID, bool isAvailable) noexcept |
Sets the availability state of the child octree rooted at the given tile. | |
void | setSubtreeAvailable (uint64_t relativeSubtreeMortonId, bool isAvailable) noexcept |
Sets the availability state of the child subtree rooted at the given tile. | |
const Cesium3DTiles::Subtree & | getSubtree () const noexcept |
Gets the subtree that this instance queries and modifies. | |
Static Public Member Functions | |
static std::optional< SubtreeAvailability > | fromSubtree (ImplicitTileSubdivisionScheme subdivisionScheme, uint32_t levelsInSubtree, Cesium3DTiles::Subtree &&subtree) noexcept |
Creates an instance from a Subtree . | |
static std::optional< SubtreeAvailability > | createEmpty (ImplicitTileSubdivisionScheme subdivisionScheme, uint32_t levelsInSubtree) noexcept |
Creates an empty instance with all tiles initially available, while all content and subtrees are initially unavailable. | |
static CesiumAsync::Future< std::optional< SubtreeAvailability > > | loadSubtree (ImplicitTileSubdivisionScheme subdivisionScheme, uint32_t levelsInSubtree, const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< CesiumAsync::IAssetAccessor > &pAssetAccessor, const std::shared_ptr< spdlog::logger > &pLogger, const std::string &subtreeUrl, const std::vector< CesiumAsync::IAssetAccessor::THeader > &requestHeaders) |
Asynchronously loads a subtree from a URL. The resource downloaded from the URL may be either a JSON or a binary subtree file. | |
Supports querying and modifying the various types of availablity information included in a Cesium3DTiles::Subtree
.
Definition at line 39 of file SubtreeAvailability.h.
A mechanism for accessing availability information. It may be a constant value, or it may be read from a bitstream.
Definition at line 124 of file SubtreeAvailability.h.
Cesium3DTilesContent::SubtreeAvailability::SubtreeAvailability | ( | ImplicitTileSubdivisionScheme | subdivisionScheme, |
uint32_t | levelsInSubtree, | ||
AvailabilityView | tileAvailability, | ||
AvailabilityView | subtreeAvailability, | ||
std::vector< AvailabilityView > && | contentAvailability, | ||
Cesium3DTiles::Subtree && | subtree ) |
Constructs a new instance.
subdivisionScheme | The subdivision scheme of the subtree (quadtree or octree). |
levelsInSubtree | The number of levels in this subtree. |
tileAvailability | A view on the tile availability. If backed by a buffer, the buffer is expected to be in subtree . |
subtreeAvailability | A view on the subtree availability. If backed by a buffer, the buffer is expected to be in subtree . |
contentAvailability | A view on the content availability. If backed by a buffer, the buffer is expected to be in subtree . |
subtree | The subtree with which this instance queries and modifies availability information. |
|
staticnoexcept |
Creates an empty instance with all tiles initially available, while all content and subtrees are initially unavailable.
subdivisionScheme | The subdivision scheme of the subtree (quadtree or octree). |
levelsInSubtree | The number of levels in this subtree. |
|
staticnoexcept |
Creates an instance from a Subtree
.
subdivisionScheme | The subdivision scheme of the subtree (quadtree or octree). |
levelsInSubtree | The number of levels in this subtree. |
subtree | The subtree. |
|
inlinenoexcept |
Gets the subtree that this instance queries and modifies.
Definition at line 409 of file SubtreeAvailability.h.
|
noexcept |
Determines if content for a given tile in the octree is available.
subtreeId | The ID of the root tile of the subtree. |
tileId | The ID of the tile to query. |
contentId | The ID of the content to query. |
|
noexcept |
Determines if content for a given tile in the quadtree is available.
subtreeId | The ID of the root tile of the subtree. |
tileId | The ID of the tile to query. |
contentId | The ID of the content to query. |
|
noexcept |
Determines if content for a given tile in the subtree is available.
relativeTileLevel | The level of the tile to query, relative to the root of the subtree. |
relativeTileMortonId | The Morton ID of the tile to query. See ImplicitTilingUtilities::computeRelativeMortonIndex . |
contentId | The ID of the content to query. |
|
noexcept |
Determines if the subtree rooted at the given tile is available.
The provided checkSubtreeID
must be a child of the leaves of this subtree.
thisSubtreeID | The ID of the root tile of this subtree. |
checkSubtreeID | The ID of the tile to query to see if its subtree is available. |
|
noexcept |
Determines if the subtree rooted at the given tile is available.
The provided checkSubtreeID
must be a child of the leaves of this subtree.
thisSubtreeID | The ID of the root tile of this subtree. |
checkSubtreeID | The ID of the tile to query to see if its subtree is available. |
|
noexcept |
Determines if the subtree rooted at the given tile is available.
The provided relativeSubtreeMortonId
must refer to a child of the leaves of this subtree.
relativeSubtreeMortonId | The Morton ID of the tile for which to check subtree availability. See ImplicitTilingUtilities::computeRelativeMortonIndex . |
|
noexcept |
Determines if a given tile in the octree is available.
subtreeId | The ID of the root tile of the subtree. |
tileId | The ID of the tile to query. |
|
noexcept |
Determines if a given tile in the quadtree is available.
subtreeId | The ID of the root tile of the subtree. |
tileId | The ID of the tile to query. |
|
noexcept |
Determines if a given tile in the subtree is available.
relativeTileLevel | The level of the tile to query, relative to the root of the subtree. |
relativeTileMortonId | The Morton ID of the tile to query. See ImplicitTilingUtilities::computeRelativeMortonIndex . |
|
static |
Asynchronously loads a subtree from a URL. The resource downloaded from the URL may be either a JSON or a binary subtree file.
subdivisionScheme | The subdivision scheme of the subtree (quadtree or octree). |
levelsInSubtree | The number of levels in this subtree. |
asyncSystem | The async system with which to do background work. |
pAssetAccessor | The asset accessor to use to retrieve the subtree resource from the URL. |
pLogger | The logger to which to load errors and warnings that occur during subtree load. |
subtreeUrl | The URL from which to retrieve the subtree file. |
requestHeaders | HTTP headers to include in the request for the subtree file. |
SubtreeAvailability
instance for the subtree file, or std::nullopt if something goes wrong.
|
noexcept |
Sets the availability state of the content for a given tile in the octree.
subtreeId | The ID of the root tile of the subtree. |
tileId | The ID of the tile for which to set content availability. |
contentId | The ID of the content to query. |
isAvailable | The new availability state for the tile's content. |
|
noexcept |
Sets the availability state of the content for a given tile in the quadtree.
subtreeId | The ID of the root tile of the subtree. |
tileId | The ID of the tile for which to set content availability. |
contentId | The ID of the content to query. |
isAvailable | The new availability state for the tile's content. |
|
noexcept |
Sets the availability state of the content for a given tile in the subtree.
relativeTileLevel | The level of the tile for which to set content availability, relative to the root of the subtree. |
relativeTileMortonId | The Morton ID of the tile for which to set content availability. See ImplicitTilingUtilities::computeRelativeMortonIndex . |
contentId | The ID of the content to query. |
isAvailable | The new availability state for the tile's content. |
|
noexcept |
Sets the availability state of the child octree rooted at the given tile.
The provided setSubtreeID
must be a child of the leaves of this subtree.
thisSubtreeID | The ID of the root tile of this subtree. |
setSubtreeID | The ID of the tile to query to see if its subtree is available. |
isAvailable | The new availability state for the subtree. |
|
noexcept |
Sets the availability state of the child quadtree rooted at the given tile.
The provided setSubtreeID
must be a child of the leaves of this subtree.
thisSubtreeID | The ID of the root tile of this subtree. |
setSubtreeID | The ID of the tile to query to see if its subtree is available. |
isAvailable | The new availability state for the subtree. |
|
noexcept |
Sets the availability state of the child subtree rooted at the given tile.
The provided relativeSubtreeMortonId
must refer to a child of the leaves of this subtree.
relativeSubtreeMortonId | The Morton ID of the tile for which to set subtree availability. See ImplicitTilingUtilities::computeRelativeMortonIndex . |
isAvailable | The new availability state. |
|
noexcept |
Sets the availability state of a given tile in the octree.
subtreeId | The ID of the root tile of the subtree. |
tileId | The ID of the tile for which to set availability. |
isAvailable | The new availability state for the tile. |
|
noexcept |
Sets the availability state of a given tile in the quadtree.
subtreeId | The ID of the root tile of the subtree. |
tileId | The ID of the tile for which to set availability. |
isAvailable | The new availability state for the tile. |
|
noexcept |
Sets the availability state of a given tile in the subtree.
relativeTileLevel | The level of the tile for which to set availability, relative to the root of the subtree. |
relativeTileMortonId | The Morton ID of the tile for which to set availability. See ImplicitTilingUtilities::computeRelativeMortonIndex . |
isAvailable | The new availability state of the tile. |