cesium-native 0.43.0
Loading...
Searching...
No Matches
Cesium3DTiles::Subtree Struct Referencefinal

An object describing the availability of tiles and content in a subtree, as well as availability of children subtrees. May also store metadata for available tiles and content. More...

#include <Cesium3DTiles/Subtree.h>

Inheritance diagram for Cesium3DTiles::Subtree:
CesiumUtility::ExtensibleObject

Public Member Functions

int64_t getSizeBytes () const
 Calculates the size in bytes of this object, including the contents of all collections, pointers, and strings. This will NOT include the size of any extensions attached to the object. Calling this method may be slow as it requires traversing the object's entire structure.
 
- Public Member Functions inherited from CesiumUtility::ExtensibleObject
template<typename T >
bool hasExtension () const noexcept
 Checks if an extension exists given its static type.
 
template<typename T >
const T * getExtension () const noexcept
 Gets an extension given its static type.
 
template<typename T >
T * getExtension () noexcept
 Gets an extension given its static type.
 
const JsonValuegetGenericExtension (const std::string &extensionName) const noexcept
 Gets a generic extension with the given name as a CesiumUtility::JsonValue.
 
JsonValuegetGenericExtension (const std::string &extensionName) noexcept
 Gets a generic extension with the given name as a CesiumUtility::JsonValue.
 
template<typename T , typename... ConstructorArgumentTypes>
T & addExtension (ConstructorArgumentTypes &&... constructorArguments)
 Adds a statically-typed extension to this object.
 
template<typename T >
void removeExtension ()
 Removes a statically-typed extension from this object.
 
int64_t getSizeBytes () const
 Calculates the size in bytes of this ExtensibleObject, including all of its extras but NOT including its extensions. Calling this method may be slow as it requires traversing the entire object.
 

Public Attributes

std::vector< Cesium3DTiles::Bufferbuffers
 An array of buffers.
 
std::vector< Cesium3DTiles::BufferViewbufferViews
 An array of buffer views.
 
std::vector< Cesium3DTiles::PropertyTablepropertyTables
 An array of property tables.
 
Cesium3DTiles::Availability tileAvailability
 The availability of tiles in the subtree. The availability bitstream is a 1D boolean array where tiles are ordered by their level in the subtree and Morton index within that level. A tile's availability is determined by a single bit, 1 meaning a tile exists at that spatial index, and 0 meaning it does not. The number of elements in the array is (N^subtreeLevels - 1)/(N - 1) where N is 4 for subdivision scheme QUADTREE and 8 for OCTREE. Availability may be stored in a buffer view or as a constant value that applies to all tiles. If a non-root tile's availability is 1 its parent tile's availability shall also be 1. tileAvailability.constant: 0 is disallowed, as subtrees shall have at least one tile.
 
std::vector< Cesium3DTiles::AvailabilitycontentAvailability
 An array of content availability objects. If the tile has a single content this array will have one element; if the tile has multiple contents.
 
Cesium3DTiles::Availability childSubtreeAvailability
 The availability of children subtrees. The availability bitstream is a 1D boolean array where subtrees are ordered by their Morton index in the level of the tree immediately below the bottom row of the subtree. A child subtree's availability is determined by a single bit, 1 meaning a subtree exists at that spatial index, and 0 meaning it does not. The number of elements in the array is N^subtreeLevels where N is 4 for subdivision scheme QUADTREE and 8 for OCTREE. Availability may be stored in a buffer view or as a constant value that applies to all child subtrees. If availability is 0 for all child subtrees, then the tileset does not subdivide further.
 
std::optional< int64_t > tileMetadata
 Index of the property table containing tile metadata. Tile metadata only exists for available tiles and is tightly packed by increasing tile index. To access individual tile metadata, implementations may create a mapping from tile indices to tile metadata indices.
 
std::vector< int64_t > contentMetadata
 An array of indexes to property tables containing content metadata. If the tile has a single content this array will have one element; if the tile has multiple contents - as supported by 3DTILES_multiple_contents and 3D Tiles 1.1 - this array will have multiple elements. Content metadata only exists for available contents and is tightly packed by increasing tile index. To access individual content metadata, implementations may create a mapping from tile indices to content metadata indices.
 
std::optional< Cesium3DTiles::MetadataEntitysubtreeMetadata
 Subtree metadata encoded in JSON.
 
- Public Attributes inherited from CesiumUtility::ExtensibleObject
std::unordered_map< std::string, std::any > extensions
 The extensions attached to this object.
 
JsonValue::Object extras
 Application-specific data.
 
JsonValue::Object unknownProperties
 Unknown properties that exist on this object but do not have any representation in the statically-typed classes.
 

Static Public Attributes

static constexpr const char * TypeName = "Subtree"
 The original name of this type.
 

Detailed Description

An object describing the availability of tiles and content in a subtree, as well as availability of children subtrees. May also store metadata for available tiles and content.

Definition at line 23 of file Subtree.h.

Member Function Documentation

◆ getSizeBytes()

int64_t Cesium3DTiles::Subtree::getSizeBytes ( ) const
inline

Calculates the size in bytes of this object, including the contents of all collections, pointers, and strings. This will NOT include the size of any extensions attached to the object. Calling this method may be slow as it requires traversing the object's entire structure.

Definition at line 111 of file Subtree.h.

Member Data Documentation

◆ buffers

std::vector<Cesium3DTiles::Buffer> Cesium3DTiles::Subtree::buffers

An array of buffers.

Definition at line 33 of file Subtree.h.

◆ bufferViews

std::vector<Cesium3DTiles::BufferView> Cesium3DTiles::Subtree::bufferViews

An array of buffer views.

Definition at line 38 of file Subtree.h.

◆ childSubtreeAvailability

Cesium3DTiles::Availability Cesium3DTiles::Subtree::childSubtreeAvailability

The availability of children subtrees. The availability bitstream is a 1D boolean array where subtrees are ordered by their Morton index in the level of the tree immediately below the bottom row of the subtree. A child subtree's availability is determined by a single bit, 1 meaning a subtree exists at that spatial index, and 0 meaning it does not. The number of elements in the array is N^subtreeLevels where N is 4 for subdivision scheme QUADTREE and 8 for OCTREE. Availability may be stored in a buffer view or as a constant value that applies to all child subtrees. If availability is 0 for all child subtrees, then the tileset does not subdivide further.

Definition at line 79 of file Subtree.h.

◆ contentAvailability

std::vector<Cesium3DTiles::Availability> Cesium3DTiles::Subtree::contentAvailability

An array of content availability objects. If the tile has a single content this array will have one element; if the tile has multiple contents.

  • as supported by 3DTILES_multiple_contents and 3D Tiles 1.1 - this array will have multiple elements.

Definition at line 65 of file Subtree.h.

◆ contentMetadata

std::vector<int64_t> Cesium3DTiles::Subtree::contentMetadata

An array of indexes to property tables containing content metadata. If the tile has a single content this array will have one element; if the tile has multiple contents - as supported by 3DTILES_multiple_contents and 3D Tiles 1.1 - this array will have multiple elements. Content metadata only exists for available contents and is tightly packed by increasing tile index. To access individual content metadata, implementations may create a mapping from tile indices to content metadata indices.

Definition at line 98 of file Subtree.h.

◆ propertyTables

std::vector<Cesium3DTiles::PropertyTable> Cesium3DTiles::Subtree::propertyTables

An array of property tables.

Definition at line 43 of file Subtree.h.

◆ subtreeMetadata

std::optional<Cesium3DTiles::MetadataEntity> Cesium3DTiles::Subtree::subtreeMetadata

Subtree metadata encoded in JSON.

Definition at line 103 of file Subtree.h.

◆ tileAvailability

Cesium3DTiles::Availability Cesium3DTiles::Subtree::tileAvailability

The availability of tiles in the subtree. The availability bitstream is a 1D boolean array where tiles are ordered by their level in the subtree and Morton index within that level. A tile's availability is determined by a single bit, 1 meaning a tile exists at that spatial index, and 0 meaning it does not. The number of elements in the array is (N^subtreeLevels - 1)/(N - 1) where N is 4 for subdivision scheme QUADTREE and 8 for OCTREE. Availability may be stored in a buffer view or as a constant value that applies to all tiles. If a non-root tile's availability is 1 its parent tile's availability shall also be 1. tileAvailability.constant: 0 is disallowed, as subtrees shall have at least one tile.

Definition at line 57 of file Subtree.h.

◆ tileMetadata

std::optional<int64_t> Cesium3DTiles::Subtree::tileMetadata

Index of the property table containing tile metadata. Tile metadata only exists for available tiles and is tightly packed by increasing tile index. To access individual tile metadata, implementations may create a mapping from tile indices to tile metadata indices.

Definition at line 87 of file Subtree.h.

◆ TypeName

const char* Cesium3DTiles::Subtree::TypeName = "Subtree"
staticconstexpr

The original name of this type.

Definition at line 28 of file Subtree.h.


The documentation for this struct was generated from the following file: