cesium-native  0.41.0
SubtreeWriter.h
1 #pragma once
2 
3 #include "Cesium3DTilesWriter/Library.h"
4 
5 #include <CesiumJsonWriter/ExtensionWriterContext.h>
6 
7 // forward declarations
8 namespace Cesium3DTiles {
9 struct Subtree;
10 }
11 
12 namespace Cesium3DTilesWriter {
13 
18 struct CESIUM3DTILESWRITER_API SubtreeWriterResult {
22  std::vector<std::byte> subtreeBytes;
23 
27  std::vector<std::string> errors;
28 
32  std::vector<std::string> warnings;
33 };
34 
38 struct CESIUM3DTILESWRITER_API SubtreeWriterOptions {
42  bool prettyPrint = false;
43 };
44 
48 class CESIUM3DTILESWRITER_API SubtreeWriter {
49 public:
54 
59 
64 
74  const Cesium3DTiles::Subtree& subtree,
75  const SubtreeWriterOptions& options = SubtreeWriterOptions()) const;
76 
77 private:
79 };
80 
81 } // namespace Cesium3DTilesWriter
SubtreeWriterResult writeSubtree(const Cesium3DTiles::Subtree &subtree, const SubtreeWriterOptions &options=SubtreeWriterOptions()) const
Serializes the provided subtree object into a byte vector using the provided flags to convert.
const CesiumJsonWriter::ExtensionWriterContext & getExtensions() const
Gets the context used to control how subtree extensions are written.
SubtreeWriter()
Constructs a new instance.
CesiumJsonWriter::ExtensionWriterContext & getExtensions()
Gets the context used to control how subtree extensions are written.
Classes for writing 3D Tiles.
Definition: Library.h:6
Classes for using 3D Tiles.
Definition: Buffer.h:7
Options for how to write a subtree.
Definition: SubtreeWriter.h:38
The result of writing a subtree with SubtreeWriterWriter::writeSubtree.
Definition: SubtreeWriter.h:18
std::vector< std::byte > subtreeBytes
The final generated std::vector<std::byte> of the subtree JSON.
Definition: SubtreeWriter.h:22
std::vector< std::string > warnings
Warnings, if any, that occurred during the write process.
Definition: SubtreeWriter.h:32
std::vector< std::string > errors
Errors, if any, that occurred during the write process.
Definition: SubtreeWriter.h:27
An object describing the availability of tiles and content in a subtree, as well as availability of c...
Definition: Subtree.h:25