cesium-native 0.43.0
Loading...
Searching...
No Matches
LayerWriter.h
1#pragma once
2
3#include "CesiumQuantizedMeshTerrain/Library.h"
4
5#include <CesiumJsonWriter/ExtensionWriterContext.h>
6
7#include <span>
8
9// forward declarations
11struct Layer;
12}
13
15
19struct CESIUMQUANTIZEDMESHTERRAIN_API LayerWriterResult {
23 std::vector<std::byte> bytes;
24
28 std::vector<std::string> errors;
29
33 std::vector<std::string> warnings;
34};
35
39struct CESIUMQUANTIZEDMESHTERRAIN_API LayerWriterOptions {
43 bool prettyPrint = false;
44};
45
82
83} // namespace CesiumQuantizedMeshTerrain
A context for writing extensions where known extensions and their handlers can be registered.
LayerWriter()
Constructs a new instance.
CesiumJsonWriter::ExtensionWriterContext & getExtensions()
Gets the context used to control how layer.json extensions are written.
const CesiumJsonWriter::ExtensionWriterContext & getExtensions() const
Gets the context used to control how layer.json extensions are written.
LayerWriterResult write(const CesiumQuantizedMeshTerrain::Layer &layer, const LayerWriterOptions &options=LayerWriterOptions()) const
Serializes the provided Layer into a layer.json byte vector.
Classes for accessing terrain based on layer.json and quantized-mesh-1.0.
Definition Layer.h:12
Options for how to write a layer.json.
Definition LayerWriter.h:39
The result of writing a layer.json with LayerWriter::write.
Definition LayerWriter.h:19
std::vector< std::string > errors
Errors, if any, that occurred during the write process.
Definition LayerWriter.h:28
std::vector< std::string > warnings
Warnings, if any, that occurred during the write process.
Definition LayerWriter.h:33
std::vector< std::byte > bytes
The final generated std::vector<std::byte> of the layer.json.
Definition LayerWriter.h:23
A quantized-mesh terrain layer.json.
Definition Layer.h:17