5#include <CesiumTilesetJson/Asset.h>
6#include <CesiumTilesetJson/GroupMetadata.h>
7#include <CesiumTilesetJson/Library.h>
8#include <CesiumTilesetJson/MetadataEntity.h>
9#include <CesiumTilesetJson/Properties.h>
10#include <CesiumTilesetJson/Schema.h>
11#include <CesiumTilesetJson/Statistics.h>
12#include <CesiumTilesetJson/Tile.h>
13#include <CesiumUtility/ExtensibleObject.h>
17#include <unordered_map>
29 static constexpr const char*
TypeName =
"Tileset";
39 std::unordered_map<std::string, CesiumTilesetJson::Properties>
properties;
45 std::optional<CesiumTilesetJson::Schema>
schema;
63 std::vector<CesiumTilesetJson::GroupMetadata>
groups;
68 std::optional<CesiumTilesetJson::MetadataEntity>
metadata;
107 this->properties.bucket_count() *
109 for (
const auto& [k, v] : this->properties) {
110 accum += int64_t(k.capacity() *
sizeof(
char) -
sizeof(std::string));
115 accum += this->schema->getSizeBytes() -
118 if (this->schemaUri) {
119 accum += int64_t(this->schemaUri->capacity() *
sizeof(
char));
121 if (this->statistics) {
122 accum += this->statistics->getSizeBytes() -
128 accum += value.getSizeBytes() -
131 if (this->metadata) {
132 accum += this->metadata->getSizeBytes() -
137 accum += int64_t(
sizeof(std::string) * this->extensionsUsed.capacity());
138 accum += int64_t(
sizeof(std::string) * this->extensionsRequired.capacity());
148 friend struct Tileset;
Classes to represent a tileset.json from 3D Tiles 1.1.
Metadata about the entire tileset.
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
A dictionary object of metadata about per-feature properties.
An object defining classes and enums.
Statistics about entities.
A tile in a 3D Tiles tileset.
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
std::vector< CesiumTilesetJson::GroupMetadata > groups
An array of groups that tile content may belong to. Each element of this array is a metadata entity t...
std::optional< CesiumTilesetJson::Schema > schema
An object defining the structure of metadata classes and enums. When this is defined,...
static constexpr const char * TypeName
The original name of this type.
TilesetSpec()=default
This class is not meant to be instantiated directly. Use Tileset instead.
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
std::optional< std::string > schemaUri
The URI (or IRI) of the external schema file. When this is defined, then schema shall be undefined.
std::vector< std::string > extensionsRequired
Names of 3D Tiles extensions required to properly load this tileset. Each element of this array shall...
CesiumTilesetJson::Asset asset
Metadata about the entire tileset.
double geometricError
The error, in meters, introduced if this tileset is not rendered. At runtime, the geometric error is ...
std::optional< CesiumTilesetJson::MetadataEntity > metadata
A metadata entity that is associated with this tileset.
CesiumTilesetJson::Tile root
The root tile.
std::vector< std::string > extensionsUsed
Names of 3D Tiles extensions used somewhere in this tileset.
std::optional< CesiumTilesetJson::Statistics > statistics
An object containing statistics about metadata entities.
std::unordered_map< std::string, CesiumTilesetJson::Properties > properties
A dictionary object of metadata about per-feature properties.
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 ...