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
9
namespace
CesiumQuantizedMeshTerrain
{
10
struct
Layer;
11
}
12
13
namespace
CesiumQuantizedMeshTerrain
{
14
18
struct
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
38
struct
CESIUMQUANTIZEDMESHTERRAIN_API
LayerWriterOptions
{
42
bool
prettyPrint =
false
;
43
};
44
48
class
CESIUMQUANTIZEDMESHTERRAIN_API
LayerWriter
{
49
public
:
53
LayerWriter
();
54
59
CesiumJsonWriter::ExtensionWriterContext
&
getExtensions
();
60
65
const
CesiumJsonWriter::ExtensionWriterContext
&
getExtensions
()
const
;
66
74
LayerWriterResult
write
(
75
const
CesiumQuantizedMeshTerrain::Layer
& layer,
76
const
LayerWriterOptions
& options =
LayerWriterOptions
())
const
;
77
78
private
:
79
CesiumJsonWriter::ExtensionWriterContext
_context;
80
};
81
82
}
// namespace CesiumQuantizedMeshTerrain
CesiumJsonWriter::ExtensionWriterContext
A context for writing extensions where known extensions and their handlers can be registered.
Definition
ExtensionWriterContext.h:39
CesiumQuantizedMeshTerrain::LayerWriter
Writes layer.json.
Definition
LayerWriter.h:48
CesiumQuantizedMeshTerrain::LayerWriter::LayerWriter
LayerWriter()
Constructs a new instance.
CesiumQuantizedMeshTerrain::LayerWriter::getExtensions
CesiumJsonWriter::ExtensionWriterContext & getExtensions()
Gets the context used to control how layer.json extensions are written.
CesiumQuantizedMeshTerrain::LayerWriter::getExtensions
const CesiumJsonWriter::ExtensionWriterContext & getExtensions() const
Gets the context used to control how layer.json extensions are written.
CesiumQuantizedMeshTerrain::LayerWriter::write
LayerWriterResult write(const CesiumQuantizedMeshTerrain::Layer &layer, const LayerWriterOptions &options=LayerWriterOptions()) const
Serializes the provided Layer into a layer.json byte vector.
CesiumQuantizedMeshTerrain
Classes for accessing terrain based on layer.json and quantized-mesh-1.0.
Definition
Layer.h:11
CesiumQuantizedMeshTerrain::LayerWriterOptions
Options for how to write a layer.json.
Definition
LayerWriter.h:38
CesiumQuantizedMeshTerrain::LayerWriterResult
The result of writing a layer.json with LayerWriter::write.
Definition
LayerWriter.h:18
CesiumQuantizedMeshTerrain::LayerWriterResult::errors
std::vector< std::string > errors
Errors, if any, that occurred during the write process.
Definition
LayerWriter.h:27
CesiumQuantizedMeshTerrain::LayerWriterResult::warnings
std::vector< std::string > warnings
Warnings, if any, that occurred during the write process.
Definition
LayerWriter.h:32
CesiumQuantizedMeshTerrain::LayerWriterResult::bytes
std::vector< std::byte > bytes
The final generated std::vector<std::byte> of the layer.json.
Definition
LayerWriter.h:22
CesiumQuantizedMeshTerrain::Layer
A quantized-mesh terrain layer.json.
Definition
Layer.h:16
CesiumQuantizedMeshTerrain
include
CesiumQuantizedMeshTerrain
LayerWriter.h
Generated by
1.12.0