cesium-native 0.66.0
Loading...
Searching...
No Matches
Extension3dTilesSubtree.h
1// This file was generated by generate-classes.
2// DO NOT EDIT THIS FILE!
3#pragma once
4
5#include <CesiumGltf/Availability.h>
6#include <CesiumGltf/Library.h>
7#include <CesiumUtility/ExtensibleObject.h>
8
9#include <cstdint>
10#include <optional>
11#include <string>
12#include <unordered_map>
13
14namespace CesiumGltf {
19struct CESIUMGLTF_API Extension3dTilesSubtree final
24 static constexpr const char* TypeName = "Extension3dTilesSubtree";
27 static constexpr const char* ExtensionName = "3DTILES_subtree";
28
44
48 std::optional<CesiumGltf::Availability> contentAvailability;
49
65
74 std::unordered_map<std::string, int32_t> tileAttributes;
75
85 std::unordered_map<std::string, int32_t> contentAttributes;
86
95 int32_t tileProperties = -1;
96
105 int32_t contentProperties = -1;
106
113 int64_t getSizeBytes() const {
114 int64_t accum = 0;
115 accum += int64_t(sizeof(Extension3dTilesSubtree));
117 int64_t(sizeof(CesiumUtility::ExtensibleObject));
118 accum += this->tileAvailability.getSizeBytes() -
119 int64_t(sizeof(CesiumGltf::Availability));
120 if (this->contentAvailability) {
121 accum += this->contentAvailability->getSizeBytes() -
122 int64_t(sizeof(CesiumGltf::Availability));
123 }
124 accum += this->childSubtreeAvailability.getSizeBytes() -
125 int64_t(sizeof(CesiumGltf::Availability));
126 accum += int64_t(
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));
132 }
133 accum += int64_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));
139 }
140 return accum;
141 }
142};
143} // namespace CesiumGltf
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 ...