cesium-native 0.44.2
Loading...
Searching...
No Matches
LayerWriter.h
1#pragma once
2
3#include <CesiumJsonWriter/ExtensionWriterContext.h>
4#include <CesiumQuantizedMeshTerrain/Library.h>
5
6#include <span>
7
8// forward declarations
10struct Layer;
11}
12
14
18struct CESIUMQUANTIZEDMESHTERRAIN_API LayerWriterResult {
22 std::vector<std::byte> bytes;
23
27 std::vector<std::string> errors;
28
32 std::vector<std::string> warnings;
33};
34
38struct CESIUMQUANTIZEDMESHTERRAIN_API LayerWriterOptions {
42 bool prettyPrint = false;
43};
44
81
82} // 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:11
Options for how to write a layer.json.
Definition LayerWriter.h:38
The result of writing a layer.json with LayerWriter::write.
Definition LayerWriter.h:18
std::vector< std::string > errors
Errors, if any, that occurred during the write process.
Definition LayerWriter.h:27
std::vector< std::string > warnings
Warnings, if any, that occurred during the write process.
Definition LayerWriter.h:32
std::vector< std::byte > bytes
The final generated std::vector<std::byte> of the layer.json.
Definition LayerWriter.h:22
A quantized-mesh terrain layer.json.
Definition Layer.h:16