cesium-native  0.41.0
TilesetMetadata.h
1 #pragma once
2 
3 #include "Library.h"
4 
5 #include <Cesium3DTiles/GroupMetadata.h>
6 #include <Cesium3DTiles/Schema.h>
7 #include <CesiumAsync/SharedFuture.h>
8 
9 #include <optional>
10 #include <string>
11 #include <vector>
12 
13 namespace CesiumAsync {
14 class AsyncSystem;
15 class IAssetAccessor;
16 } // namespace CesiumAsync
17 
18 namespace Cesium3DTilesSelection {
19 
24 class CESIUM3DTILESSELECTION_API TilesetMetadata {
25 public:
26  ~TilesetMetadata() noexcept;
27 
32  std::optional<Cesium3DTiles::Schema> schema;
33 
38  std::optional<std::string> schemaUri;
39 
45  std::vector<Cesium3DTiles::GroupMetadata> groups;
46 
50  std::optional<Cesium3DTiles::MetadataEntity> metadata;
51 
68  const CesiumAsync::AsyncSystem& asyncSystem,
69  const std::shared_ptr<CesiumAsync::IAssetAccessor>& pAssetAccessor);
70 
71 private:
72  std::optional<CesiumAsync::SharedFuture<void>> _loadingFuture;
73  std::optional<std::string> _loadingSchemaUri;
74  std::shared_ptr<bool> _pLoadingCanceled;
75 };
76 
77 } // namespace Cesium3DTilesSelection
Holds the metadata associated with a Tileset or an external tileset.
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...
std::optional< Cesium3DTiles::Schema > schema
An object defining the structure of metadata classes and enums. When this is defined,...
std::optional< Cesium3DTiles::MetadataEntity > metadata
A metadata entity that is associated with this tileset.
CesiumAsync::SharedFuture< void > & loadSchemaUri(const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< CesiumAsync::IAssetAccessor > &pAssetAccessor)
Asynchronously loads the schema from the schemaUri. If the schemaUri does not contain a value,...
std::optional< std::string > schemaUri
The URI (or IRI) of the external schema file. When this is defined, then schema shall be undefined.
A system for managing asynchronous requests and tasks.
Definition: AsyncSystem.h:36
Classes that implement the 3D Tiles standard.
Classes that support asynchronous operations.