3#include <Cesium3DTiles/Subtree.h>
4#include <CesiumAsync/Future.h>
5#include <CesiumAsync/IAssetAccessor.h>
53 uint32_t levelsInSubtree,
68 uint32_t levelsInSubtree)
noexcept;
90 uint32_t levelsInSubtree,
92 const std::shared_ptr<CesiumAsync::IAssetAccessor>& pAssetAccessor,
93 const std::shared_ptr<spdlog::logger>& pLogger,
94 const std::string& subtreeUrl,
95 const std::vector<CesiumAsync::IAssetAccessor::THeader>& requestHeaders);
125 std::variant<SubtreeConstantAvailability, SubtreeBufferViewAvailability>;
144 uint32_t levelsInSubtree,
147 std::vector<AvailabilityView>&& contentAvailability,
182 uint32_t relativeTileLevel,
183 uint64_t relativeTileMortonId)
const noexcept;
195 bool isAvailable)
noexcept;
207 bool isAvailable)
noexcept;
220 uint32_t relativeTileLevel,
221 uint64_t relativeTileMortonId,
222 bool isAvailable)
noexcept;
235 uint64_t contentId)
const noexcept;
248 uint64_t contentId)
const noexcept;
261 uint32_t relativeTileLevel,
262 uint64_t relativeTileMortonId,
263 uint64_t contentId)
const noexcept;
278 bool isAvailable)
noexcept;
293 bool isAvailable)
noexcept;
308 uint32_t relativeTileLevel,
309 uint64_t relativeTileMortonId,
311 bool isAvailable)
noexcept;
371 bool isAvailable)
noexcept;
388 bool isAvailable)
noexcept;
403 uint64_t relativeSubtreeMortonId,
404 bool isAvailable)
noexcept;
410 return this->_subtree;
415 uint32_t relativeTileLevel,
416 uint64_t relativeTileMortonId,
419 uint32_t relativeTileLevel,
420 uint64_t relativeTileMortonId,
422 bool isAvailable)
noexcept;
424 bool isAvailableUsingBufferView(
425 uint64_t numOfTilesFromRootToParentLevel,
426 uint64_t relativeTileMortonId,
428 void setAvailableUsingBufferView(
429 uint64_t numOfTilesFromRootToParentLevel,
430 uint64_t relativeTileMortonId,
432 bool isAvailable)
noexcept;
435 uint32_t _levelsInSubtree;
437 uint32_t _childCount;
440 std::vector<AvailabilityView> _contentAvailability;
Supports querying and modifying the various types of availablity information included in a Cesium3DTi...
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.
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 ...
SubtreeAvailability(ImplicitTileSubdivisionScheme subdivisionScheme, uint32_t levelsInSubtree, AvailabilityView tileAvailability, AvailabilityView subtreeAvailability, std::vector< AvailabilityView > &&contentAvailability, Cesium3DTiles::Subtree &&subtree)
Constructs a new instance.
bool isTileAvailable(uint32_t relativeTileLevel, uint64_t relativeTileMortonId) const noexcept
Determines if a given tile in the subtree is available.
std::variant< SubtreeConstantAvailability, SubtreeBufferViewAvailability > AvailabilityView
A mechanism for accessing availability information. It may be a constant value, or it may be read fro...
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.
void setTileAvailable(const CesiumGeometry::OctreeTileID &subtreeId, const CesiumGeometry::OctreeTileID &tileId, bool isAvailable) noexcept
Sets the availability state of a given tile in the octree.
bool isSubtreeAvailable(uint64_t relativeSubtreeMortonId) const noexcept
Determines if the subtree rooted at the given tile is available.
bool isTileAvailable(const CesiumGeometry::OctreeTileID &subtreeId, const CesiumGeometry::OctreeTileID &tileId) const noexcept
Determines if a given tile in the octree is available.
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.
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.
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 init...
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(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 isTileAvailable(const CesiumGeometry::QuadtreeTileID &subtreeId, const CesiumGeometry::QuadtreeTileID &tileId) const noexcept
Determines if a given tile in the quadtree 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 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 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.
bool isSubtreeAvailable(const CesiumGeometry::QuadtreeTileID &thisSubtreeID, const CesiumGeometry::QuadtreeTileID &checkSubtreeID) const noexcept
Determines if the subtree rooted at the given tile is available.
const Cesium3DTiles::Subtree & getSubtree() const noexcept
Gets the subtree that this instance queries and modifies.
bool isSubtreeAvailable(const CesiumGeometry::OctreeTileID &thisSubtreeID, const CesiumGeometry::OctreeTileID &checkSubtreeID) const noexcept
Determines if the subtree rooted at the given tile is available.
void setSubtreeAvailable(uint64_t relativeSubtreeMortonId, bool isAvailable) noexcept
Sets the availability state of the child subtree rooted at the given tile.
void setTileAvailable(uint32_t relativeTileLevel, uint64_t relativeTileMortonId, bool isAvailable) noexcept
Sets the availability state of a given tile in the subtree.
A system for managing asynchronous requests and tasks.
A value that will be available in the future, as produced by AsyncSystem.
Classes that support loading and converting 3D Tiles tile content.
ImplicitTileSubdivisionScheme
Indicates how an implicit tile is subdivided.
@ Octree
Implicit tiles are divided into eight children, forming an octree.
@ Quadtree
Implicit tiles are divided into four children, forming a quadree.
Classes for using 3D Tiles.
Basic geometry classes for Cesium.
An AvailabilityView that accesses availability information from a bitstream.
std::span< std::byte > view
The buffer from which to read and write availability information.
An AvailibilityView that indicates that either all tiles are available or all tiles are unavailable.
bool constant
True if all tiles are availabile, false if all tiles are unavailable.
An object describing the availability of tiles and content in a subtree, as well as availability of c...
A structure serving as a unique identifier for a node in an octree.
Uniquely identifies a node in a quadtree.