3#include <CesiumGltfWriter/Library.h>
4#include <CesiumJsonWriter/ExtensionWriterContext.h>
104 const std::span<const std::byte>& bufferData,
GltfWriterResult writeGlb(const CesiumGltf::Model &model, const std::span< const std::byte > &bufferData, const GltfWriterOptions &options=GltfWriterOptions()) const
Serializes the provided model into a glb byte vector.
CesiumJsonWriter::ExtensionWriterContext & getExtensions()
Gets the context used to control how glTF extensions are written.
const CesiumJsonWriter::ExtensionWriterContext & getExtensions() const
Gets the context used to control how glTF extensions are written.
GltfWriter()
Constructs a new instance.
GltfWriterResult writeGltf(const CesiumGltf::Model &model, const GltfWriterOptions &options=GltfWriterOptions()) const
Serializes the provided model into a glTF JSON byte vector.
A context for writing extensions where known extensions and their handlers can be registered.
Classes for writing glTF models.
Classes for working with glTF models.
Options for how to write a glTF.
bool prettyPrint
If the glTF JSON should be pretty printed. Usable with glTF or GLB (not advised).
size_t binaryChunkByteAlignment
Byte alignment of the GLB binary chunk. When using 64-bit types in EXT_mesh_features this value shoul...
The result of writing a glTF with GltfWriter::writeGltf or GltfWriter::writeGlb.
std::vector< std::string > errors
Errors, if any, that occurred during the write process.
std::vector< std::string > warnings
Warnings, if any, that occurred during the write process.
std::vector< std::byte > gltfBytes
The final generated std::vector<std::byte> of the glTF or glb.
This class is not meant to be instantiated directly. Use Model instead.