cesium-native  0.41.0
TilesetWriter.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 Tileset;
10 }
11 
12 namespace Cesium3DTilesWriter {
13 
18 struct CESIUM3DTILESWRITER_API TilesetWriterResult {
22  std::vector<std::byte> tilesetBytes;
23 
27  std::vector<std::string> errors;
28 
32  std::vector<std::string> warnings;
33 };
34 
38 struct CESIUM3DTILESWRITER_API TilesetWriterOptions {
42  bool prettyPrint = false;
43 };
44 
48 class CESIUM3DTILESWRITER_API TilesetWriter {
49 public:
54 
59 
64 
74  const Cesium3DTiles::Tileset& tileset,
75  const TilesetWriterOptions& options = TilesetWriterOptions()) const;
76 
77 private:
79 };
80 
81 } // namespace Cesium3DTilesWriter
TilesetWriterResult writeTileset(const Cesium3DTiles::Tileset &tileset, const TilesetWriterOptions &options=TilesetWriterOptions()) const
Serializes the provided tileset object into a byte vector using the provided flags to convert.
const CesiumJsonWriter::ExtensionWriterContext & getExtensions() const
Gets the context used to control how tileset extensions are written.
TilesetWriter()
Constructs a new instance.
CesiumJsonWriter::ExtensionWriterContext & getExtensions()
Gets the context used to control how tileset 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 tileset.
Definition: TilesetWriter.h:38
The result of writing a tileset with TilesetWriter::writeTileset.
Definition: TilesetWriter.h:18
std::vector< std::byte > tilesetBytes
The final generated std::vector<std::byte> of the tileset.
Definition: TilesetWriter.h:22
std::vector< std::string > errors
Errors, if any, that occurred during the write process.
Definition: TilesetWriter.h:27
std::vector< std::string > warnings
Warnings, if any, that occurred during the write process.
Definition: TilesetWriter.h:32
A 3D Tiles tileset.
Definition: Tileset.h:26