5#include <CesiumGltf/Availability.h>
6#include <CesiumGltf/Library.h>
7#include <CesiumUtility/ExtensibleObject.h>
12#include <unordered_map>
24 static constexpr const char*
TypeName =
"Extension3dTilesSubtree";
120 if (this->contentAvailability) {
121 accum += this->contentAvailability->getSizeBytes() -
124 accum += this->childSubtreeAvailability.
getSizeBytes() -
127 this->tileAttributes.bucket_count() *
128 (
sizeof(std::string) +
sizeof(int32_t)));
129 for (
const auto& [k, v] : this->tileAttributes) {
130 accum += int64_t(k.capacity() *
sizeof(
char) -
sizeof(std::string));
131 accum += int64_t(
sizeof(int32_t));
134 this->contentAttributes.bucket_count() *
135 (
sizeof(std::string) +
sizeof(int32_t)));
136 for (
const auto& [k, v] : this->contentAttributes) {
137 accum += int64_t(k.capacity() *
sizeof(
char) -
sizeof(std::string));
138 accum += int64_t(
sizeof(int32_t));
Classes for working with glTF models.
An object describing the availability of a set of elements.
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
An object describing tile, content, and child subtree availability, attributes, and properties.
int32_t tileProperties
Index of the property table containing tile properties.
std::unordered_map< std::string, int32_t > tileAttributes
A dictionary mapping tile attribute semantics to accessor indices.
static constexpr const char * ExtensionName
The official name of the extension. This should be the same as its key in the extensions object.
static constexpr const char * TypeName
The original name of this type.
std::optional< CesiumGltf::Availability > contentAvailability
The availability of contents in the subtree.
CesiumGltf::Availability childSubtreeAvailability
The availability of child subtrees.
CesiumGltf::Availability tileAvailability
The availability of tiles in the subtree.
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
int32_t contentProperties
Index of the property table containing content properties.
std::unordered_map< std::string, int32_t > contentAttributes
A dictionary mapping content attribute semantics to accessor indices.
The base class for objects that have extensions and extras.
int64_t getSizeBytes() const
Calculates the size in bytes of this ExtensibleObject, including all of its extras but NOT including ...