cesium-native 0.43.0
Loading...
Searching...
No Matches
Tileset.h
1// This file was generated by generate-classes.
2// DO NOT EDIT THIS FILE!
3#pragma once
4
5#include <Cesium3DTiles/Asset.h>
6#include <Cesium3DTiles/GroupMetadata.h>
7#include <Cesium3DTiles/Library.h>
8#include <Cesium3DTiles/MetadataEntity.h>
9#include <Cesium3DTiles/Properties.h>
10#include <Cesium3DTiles/Schema.h>
11#include <Cesium3DTiles/Statistics.h>
12#include <Cesium3DTiles/Tile.h>
13#include <CesiumUtility/ExtensibleObject.h>
14
15#include <optional>
16#include <string>
17#include <unordered_map>
18#include <vector>
19
20namespace Cesium3DTiles {
24struct CESIUM3DTILES_API Tileset final
29 static constexpr const char* TypeName = "Tileset";
30
35
39 std::unordered_map<std::string, Cesium3DTiles::Properties> properties;
40
45 std::optional<Cesium3DTiles::Schema> schema;
46
51 std::optional<std::string> schemaUri;
52
56 std::optional<Cesium3DTiles::Statistics> statistics;
57
63 std::vector<Cesium3DTiles::GroupMetadata> groups;
64
68 std::optional<Cesium3DTiles::MetadataEntity> metadata;
69
75 double geometricError = double();
76
81
85 std::vector<std::string> extensionsUsed;
86
91 std::vector<std::string> extensionsRequired;
92
99 int64_t getSizeBytes() const {
100 int64_t accum = 0;
101 accum += int64_t(sizeof(Tileset));
103 int64_t(sizeof(CesiumUtility::ExtensibleObject));
104 accum += this->asset.getSizeBytes() - int64_t(sizeof(Cesium3DTiles::Asset));
105 accum += int64_t(
106 this->properties.bucket_count() *
107 (sizeof(std::string) + sizeof(Cesium3DTiles::Properties)));
108 for (const auto& [k, v] : this->properties) {
109 accum += int64_t(k.capacity() * sizeof(char) - sizeof(std::string));
110 accum += v.getSizeBytes() - int64_t(sizeof(Cesium3DTiles::Properties));
111 }
112 if (this->schema) {
113 accum +=
114 this->schema->getSizeBytes() - int64_t(sizeof(Cesium3DTiles::Schema));
115 }
116 if (this->schemaUri) {
117 accum += int64_t(this->schemaUri->capacity() * sizeof(char));
118 }
119 if (this->statistics) {
120 accum += this->statistics->getSizeBytes() -
121 int64_t(sizeof(Cesium3DTiles::Statistics));
122 }
123 accum +=
124 int64_t(sizeof(Cesium3DTiles::GroupMetadata) * this->groups.capacity());
125 for (const Cesium3DTiles::GroupMetadata& value : this->groups) {
126 accum +=
127 value.getSizeBytes() - int64_t(sizeof(Cesium3DTiles::GroupMetadata));
128 }
129 if (this->metadata) {
130 accum += this->metadata->getSizeBytes() -
131 int64_t(sizeof(Cesium3DTiles::MetadataEntity));
132 }
133 accum += this->root.getSizeBytes() - int64_t(sizeof(Cesium3DTiles::Tile));
134 accum += int64_t(sizeof(std::string) * this->extensionsUsed.capacity());
135 accum += int64_t(sizeof(std::string) * this->extensionsRequired.capacity());
136 return accum;
137 }
138};
139} // namespace Cesium3DTiles
Classes for using 3D Tiles.
Definition Buffer.h:7
Metadata about the entire tileset.
Definition Asset.h:15
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition Asset.h:39
An object containing metadata about a group.
An object containing a reference to a class from a metadata schema, and property values that conform ...
A dictionary object of metadata about per-feature properties.
Definition Properties.h:13
An object defining classes and enums.
Definition Schema.h:18
Statistics about entities.
Definition Statistics.h:17
A tile in a 3D Tiles tileset.
Definition Tile.h:20
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition Tile.h:121
A 3D Tiles tileset.
Definition Tileset.h:25
Cesium3DTiles::Tile root
The root tile.
Definition Tileset.h:80
std::optional< Cesium3DTiles::MetadataEntity > metadata
A metadata entity that is associated with this tileset.
Definition Tileset.h:68
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition Tileset.h:99
std::vector< std::string > extensionsRequired
Names of 3D Tiles extensions required to properly load this tileset. Each element of this array shall...
Definition Tileset.h:91
std::optional< Cesium3DTiles::Statistics > statistics
An object containing statistics about metadata entities.
Definition Tileset.h:56
std::vector< std::string > extensionsUsed
Names of 3D Tiles extensions used somewhere in this tileset.
Definition Tileset.h:85
std::unordered_map< std::string, Cesium3DTiles::Properties > properties
A dictionary object of metadata about per-feature properties.
Definition Tileset.h:39
std::vector< Cesium3DTiles::GroupMetadata > groups
An array of groups that tile content may belong to. Each element of this array is a metadata entity t...
Definition Tileset.h:63
Cesium3DTiles::Asset asset
Metadata about the entire tileset.
Definition Tileset.h:34
std::optional< std::string > schemaUri
The URI (or IRI) of the external schema file. When this is defined, then schema shall be undefined.
Definition Tileset.h:51
std::optional< Cesium3DTiles::Schema > schema
An object defining the structure of metadata classes and enums. When this is defined,...
Definition Tileset.h:45
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 ...