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
10
namespace
CesiumQuantizedMeshTerrain
{
11
struct
Layer;
12
}
13
14
namespace
CesiumQuantizedMeshTerrain
{
15
19
struct
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
39
struct
CESIUMQUANTIZEDMESHTERRAIN_API
LayerWriterOptions
{
43
bool
prettyPrint =
false
;
44
};
45
49
class
CESIUMQUANTIZEDMESHTERRAIN_API
LayerWriter
{
50
public
:
54
LayerWriter
();
55
60
CesiumJsonWriter::ExtensionWriterContext
&
getExtensions
();
61
66
const
CesiumJsonWriter::ExtensionWriterContext
&
getExtensions
()
const
;
67
75
LayerWriterResult
write
(
76
const
CesiumQuantizedMeshTerrain::Layer
& layer,
77
const
LayerWriterOptions
& options =
LayerWriterOptions
())
const
;
78
79
private
:
80
CesiumJsonWriter::ExtensionWriterContext
_context;
81
};
82
83
}
// 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:49
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:12
CesiumQuantizedMeshTerrain::LayerWriterOptions
Options for how to write a layer.json.
Definition
LayerWriter.h:39
CesiumQuantizedMeshTerrain::LayerWriterResult
The result of writing a layer.json with LayerWriter::write.
Definition
LayerWriter.h:19
CesiumQuantizedMeshTerrain::LayerWriterResult::errors
std::vector< std::string > errors
Errors, if any, that occurred during the write process.
Definition
LayerWriter.h:28
CesiumQuantizedMeshTerrain::LayerWriterResult::warnings
std::vector< std::string > warnings
Warnings, if any, that occurred during the write process.
Definition
LayerWriter.h:33
CesiumQuantizedMeshTerrain::LayerWriterResult::bytes
std::vector< std::byte > bytes
The final generated std::vector<std::byte> of the layer.json.
Definition
LayerWriter.h:23
CesiumQuantizedMeshTerrain::Layer
A quantized-mesh terrain layer.json.
Definition
Layer.h:17
CesiumQuantizedMeshTerrain
include
CesiumQuantizedMeshTerrain
LayerWriter.h
Generated by
1.12.0